Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions pytype/tools/analyze_project/pytype_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,6 @@ def get_module_action(self, module):
else:
action = Action.INFER
report = logging.info
if not f.endswith('.py'):
report('skipped: non-Python file %s', f)
return None
# For builtin and system files, do not attempt to generate a pyi.
if module.kind in ('Builtin', 'System'):
action = Action.GENERATE_DEFAULT
Expand Down
12 changes: 0 additions & 12 deletions pytype/tools/analyze_project/pytype_runner_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,6 @@ def test_generate_default(self):
runner.get_module_action(Module('', 'foo.py', 'foo', 'System')),
pytype_runner.Action.GENERATE_DEFAULT)

def test_skip(self):
runner = make_runner([], [], self.parser.config_from_defaults())
self.assertIsNone(runner.get_module_action(Module('', 'foo.cc', 'foo')))


class TestYieldSortedModules(TestBase):
"""Tests for PytypeRunner.yield_sorted_modules()."""
Expand Down Expand Up @@ -320,14 +316,6 @@ def test_cycle(self):
(dep, Action.INFER, (dep, src), Stage.SECOND_PASS),
(src, Action.CHECK, (dep, src), Stage.SECOND_PASS)])

def test_non_py_dep(self):
conf = self.parser.config_from_defaults()
d = self.normalize('foo/')
conf.pythonpath = [d]
dep = Module(d, 'bar.so', 'bar')
runner = make_runner([], [((dep,), ())], conf)
self.assert_sorted_modules_equal(runner.yield_sorted_modules(), [])

def test_system_dep(self):
conf = self.parser.config_from_defaults()
d = self.normalize('foo/')
Expand Down