skylos 1.2.1__tar.gz → 1.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of skylos might be problematic. Click here for more details.

Files changed (38) hide show
  1. {skylos-1.2.1 → skylos-1.2.2}/PKG-INFO +1 -1
  2. {skylos-1.2.1 → skylos-1.2.2}/README.md +1 -0
  3. {skylos-1.2.1 → skylos-1.2.2}/pyproject.toml +1 -1
  4. {skylos-1.2.1 → skylos-1.2.2}/setup.py +1 -1
  5. {skylos-1.2.1 → skylos-1.2.2}/skylos/analyzer.py +7 -4
  6. {skylos-1.2.1 → skylos-1.2.2}/skylos.egg-info/PKG-INFO +1 -1
  7. {skylos-1.2.1 → skylos-1.2.2}/setup.cfg +0 -0
  8. {skylos-1.2.1 → skylos-1.2.2}/skylos/__init__.py +0 -0
  9. {skylos-1.2.1 → skylos-1.2.2}/skylos/cli.py +0 -0
  10. {skylos-1.2.1 → skylos-1.2.2}/skylos/constants.py +0 -0
  11. {skylos-1.2.1 → skylos-1.2.2}/skylos/framework_aware.py +0 -0
  12. {skylos-1.2.1 → skylos-1.2.2}/skylos/test_aware.py +0 -0
  13. {skylos-1.2.1 → skylos-1.2.2}/skylos/visitor.py +0 -0
  14. {skylos-1.2.1 → skylos-1.2.2}/skylos.egg-info/SOURCES.txt +0 -0
  15. {skylos-1.2.1 → skylos-1.2.2}/skylos.egg-info/dependency_links.txt +0 -0
  16. {skylos-1.2.1 → skylos-1.2.2}/skylos.egg-info/entry_points.txt +0 -0
  17. {skylos-1.2.1 → skylos-1.2.2}/skylos.egg-info/requires.txt +0 -0
  18. {skylos-1.2.1 → skylos-1.2.2}/skylos.egg-info/top_level.txt +0 -0
  19. {skylos-1.2.1 → skylos-1.2.2}/test/__init__.py +0 -0
  20. {skylos-1.2.1 → skylos-1.2.2}/test/compare_tools.py +0 -0
  21. {skylos-1.2.1 → skylos-1.2.2}/test/conftest.py +0 -0
  22. {skylos-1.2.1 → skylos-1.2.2}/test/diagnostics.py +0 -0
  23. {skylos-1.2.1 → skylos-1.2.2}/test/sample_repo/__init__.py +0 -0
  24. {skylos-1.2.1 → skylos-1.2.2}/test/sample_repo/app.py +0 -0
  25. {skylos-1.2.1 → skylos-1.2.2}/test/sample_repo/sample_repo/__init__.py +0 -0
  26. {skylos-1.2.1 → skylos-1.2.2}/test/sample_repo/sample_repo/commands.py +0 -0
  27. {skylos-1.2.1 → skylos-1.2.2}/test/sample_repo/sample_repo/models.py +0 -0
  28. {skylos-1.2.1 → skylos-1.2.2}/test/sample_repo/sample_repo/routes.py +0 -0
  29. {skylos-1.2.1 → skylos-1.2.2}/test/sample_repo/sample_repo/utils.py +0 -0
  30. {skylos-1.2.1 → skylos-1.2.2}/test/test_analyzer.py +0 -0
  31. {skylos-1.2.1 → skylos-1.2.2}/test/test_changes_analyzer.py +0 -0
  32. {skylos-1.2.1 → skylos-1.2.2}/test/test_cli.py +0 -0
  33. {skylos-1.2.1 → skylos-1.2.2}/test/test_constants.py +0 -0
  34. {skylos-1.2.1 → skylos-1.2.2}/test/test_framework_aware.py +0 -0
  35. {skylos-1.2.1 → skylos-1.2.2}/test/test_integration.py +0 -0
  36. {skylos-1.2.1 → skylos-1.2.2}/test/test_skylos.py +0 -0
  37. {skylos-1.2.1 → skylos-1.2.2}/test/test_test_aware.py +0 -0
  38. {skylos-1.2.1 → skylos-1.2.2}/test/test_visitor.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: skylos
3
- Version: 1.2.1
3
+ Version: 1.2.2
4
4
  Summary: A static analysis tool for Python codebases
5
5
  Author-email: oha <aaronoh2015@gmail.com>
6
6
  Requires-Python: >=3.9
@@ -41,6 +41,7 @@
41
41
  * **Unused Classes**: Detects classes that are not instantiated or inherited
42
42
  * **Unused Imports**: Identifies imports that are not used
43
43
  * **Folder Management**: Inclusion/exclusion of directories
44
+ * **Ignore Pragmas**: Skip lines tagged with `# pragma: no skylos`, `# pragma: no cover`, or `# noqa`
44
45
 
45
46
  ## Benchmark (You can find this benchmark test in `test` folder)
46
47
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "skylos"
7
- version = "1.2.1"
7
+ version = "1.2.2"
8
8
  requires-python = ">=3.9"
9
9
  description = "A static analysis tool for Python codebases"
10
10
  authors = [{name = "oha", email = "aaronoh2015@gmail.com"}]
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="skylos",
5
- version="1.2.1",
5
+ version="1.2.2",
6
6
  packages=find_packages(),
7
7
  python_requires=">=3.9",
8
8
  install_requires=["inquirer>=3.0.0"],
@@ -283,10 +283,13 @@ class Skylos:
283
283
 
284
284
  unused = []
285
285
  for d in self.defs.values():
286
- if (d.references == 0 and not d.is_exported
287
- and d.confidence >= thr
288
- and d.line not in self.ignored_lines):
289
- unused.append(d.to_dict())
286
+ # skip anything on line that carries ignore pragma
287
+ if d.line in self.ignored_lines:
288
+ continue
289
+
290
+ if (d.references == 0 and not d.is_exported
291
+ and d.confidence >= thr):
292
+ unused.append(d.to_dict())
290
293
 
291
294
  result = {
292
295
  "unused_functions": [],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: skylos
3
- Version: 1.2.1
3
+ Version: 1.2.2
4
4
  Summary: A static analysis tool for Python codebases
5
5
  Author-email: oha <aaronoh2015@gmail.com>
6
6
  Requires-Python: >=3.9
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes