Skip to content

Commit

Permalink
Silence new flake8 error (E305).
Browse files Browse the repository at this point in the history
  • Loading branch information
Guido van Rossum committed Nov 14, 2016
1 parent f4295b6 commit 8c6ba06
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions mypy/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -2399,6 +2399,7 @@ def push_type_map(self, type_map: Optional[Dict[Expression, Type]]) -> None:
# probably be better to have the dict keyed by the nodes' literal_hash
# field instead.


TypeMap = Optional[Dict[Expression, Type]]


Expand Down
1 change: 1 addition & 0 deletions mypy/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ class Statement(Node):
class Expression(Node):
"""An expression node."""


# TODO:
# Lvalue = Union['NameExpr', 'MemberExpr', 'IndexExpr', 'SuperExpr', 'StarExpr'
# 'TupleExpr', 'ListExpr']; see #1783.
Expand Down
8 changes: 8 additions & 0 deletions mypy/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ def on_finish(self) -> None:
f.write('{:7} {:7} {:6} {:6} {}\n'.format(
c[0], c[1], c[2], c[3], p))


register_reporter('linecount', LineCountReporter)


Expand Down Expand Up @@ -240,6 +241,7 @@ def on_finish(self) -> None:
with open(os.path.join(self.output_dir, 'coverage.json'), 'w') as f:
json.dump({'lines': self.lines_covered}, f)


register_reporter('linecoverage', LineCoverageReporter)


Expand All @@ -256,6 +258,7 @@ def on_file(self, tree: MypyFile, type_map: Dict[Expression, Type]) -> None:
def on_finish(self) -> None:
stats.generate_html_index(self.output_dir)


register_reporter('old-html', OldHtmlReporter)


Expand Down Expand Up @@ -346,6 +349,7 @@ def on_finish(self) -> None:

self.last_xml = doc


register_reporter('memory-xml', MemoryXmlReporter, needs_lxml=True)


Expand Down Expand Up @@ -466,6 +470,7 @@ def on_finish(self) -> None:
self.doc.write(out_path, encoding='utf-8', pretty_print=True)
print('Generated Cobertura report:', os.path.abspath(out_path))


register_reporter('cobertura-xml', CoberturaXmlReporter, needs_lxml=True)


Expand Down Expand Up @@ -511,6 +516,7 @@ def on_finish(self) -> None:
shutil.copyfile(self.memory_xml.css_html_path, out_css)
print('Generated XML report:', os.path.abspath(out_path))


register_reporter('xml', XmlReporter, needs_lxml=True)


Expand Down Expand Up @@ -550,6 +556,7 @@ def on_finish(self) -> None:
shutil.copyfile(self.memory_xml.css_html_path, out_css)
print('Generated HTML report (via XSLT):', os.path.abspath(out_path))


register_reporter('xslt-html', XsltHtmlReporter, needs_lxml=True)


Expand All @@ -576,6 +583,7 @@ def on_finish(self) -> None:
out_file.write(transformed_txt)
print('Generated TXT report (via XSLT):', os.path.abspath(out_path))


register_reporter('xslt-txt', XsltTxtReporter, needs_lxml=True)

alias_reporter('xslt-html', 'html')
Expand Down
1 change: 1 addition & 0 deletions mypy/test/testsemanal.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def test_semanal(testcase):
'Invalid semantic analyzer output ({}, line {})'.format(testcase.file,
testcase.line))


# Semantic analyzer error test cases

# Paths to files containing test case descriptions.
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def run(self):
'Topic :: Software Development',
]


package_dir = {'mypy': 'mypy'}
if sys.version_info < (3, 5, 0):
package_dir[''] = 'lib-typing/3.2'
Expand Down

0 comments on commit 8c6ba06

Please sign in to comment.