Skip to content

Clean up adc.py#304

Open
DanielSank wants to merge 2 commits into
masterfrom
u/danielsank/adc-doc
Open

Clean up adc.py#304
DanielSank wants to merge 2 commits into
masterfrom
u/danielsank/adc-doc

Conversation

@DanielSank

Copy link
Copy Markdown
Member
  • Line lengths
  • Dangling white space
  • Remove copypasta from ADC interface spec sheet

@jwenner

jwenner commented Jan 20, 2016

Copy link
Copy Markdown
Contributor

FYI, there's an fpga test which this breaks:

  test_fpga_server.top_level_collect 
('fpgalib/test/test_fpga_server.py', None, 'fpgalib/test/test_fpga_server.py')
.venv/local/lib/python2.7/site-packages/_pytest/python.py:610: in _importtestmodule
    mod = self.fspath.pyimport(ensuresyspath=importmode)
.venv/local/lib/python2.7/site-packages/py/_path/local.py:650: in pyimport
    __import__(modname)
.venv/local/lib/python2.7/site-packages/_pytest/assertion/rewrite.py:171: in load_module
    py.builtin.exec_(co, mod.__dict__)
servers/fpgalib/test/test_fpga_server.py:28: in <module>
    import ghz_fpga_server
servers/ghz_fpga_server.py:212: in <module>
    import fpgalib.adc as adc
E     File "/opt/TeamCity/buildAgent/work/872fe26a728e05ba/servers/fpgalib/adc.py", line 60
E       self.boardGroup = group
E          ^
E   SyntaxError: invalid syntax

Comment thread fpgalib/adc.py

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python 2.7 has dict comprehensions so you could do

channels = {i: info[i]
            for i in range(self.DEMOD_CHANNELS) if i in info}

@maffoo

maffoo commented Jan 26, 2016

Copy link
Copy Markdown
Contributor

A few small comments, and need to fix syntax error; otherwise LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants