envoy.code.check 0.5.8__tar.gz → 0.5.11__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.
Files changed (32) hide show
  1. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/PKG-INFO +1 -1
  2. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy/code/check/abstract/extensions.py +2 -1
  3. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy/code/check/abstract/yamllint.py +4 -23
  4. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy/code/check/checker.py +1 -1
  5. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy.code.check.egg-info/PKG-INFO +1 -1
  6. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy.code.check.egg-info/requires.txt +1 -1
  7. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/setup.py +2 -2
  8. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/MANIFEST.in +0 -0
  9. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/backend_shim.py +0 -0
  10. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy/code/check/__init__.py +0 -0
  11. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy/code/check/abstract/__init__.py +0 -0
  12. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy/code/check/abstract/base.py +0 -0
  13. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy/code/check/abstract/changelog.py +0 -0
  14. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy/code/check/abstract/checker.py +0 -0
  15. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy/code/check/abstract/flake8.py +0 -0
  16. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy/code/check/abstract/glint.py +0 -0
  17. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy/code/check/abstract/gofmt.py +0 -0
  18. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy/code/check/abstract/rst.py +0 -0
  19. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy/code/check/abstract/runtime_guards.py +0 -0
  20. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy/code/check/abstract/shellcheck.py +0 -0
  21. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy/code/check/abstract/yapf.py +0 -0
  22. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy/code/check/cmd.py +0 -0
  23. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy/code/check/exceptions.py +0 -0
  24. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy/code/check/interface.py +0 -0
  25. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy/code/check/py.typed +0 -0
  26. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy/code/check/typing.py +0 -0
  27. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy.code.check.egg-info/SOURCES.txt +0 -0
  28. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy.code.check.egg-info/dependency_links.txt +0 -0
  29. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy.code.check.egg-info/entry_points.txt +0 -0
  30. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy.code.check.egg-info/namespace_packages.txt +0 -0
  31. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/envoy.code.check.egg-info/top_level.txt +0 -0
  32. {envoy.code.check-0.5.8 → envoy.code.check-0.5.11}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: envoy.code.check
3
- Version: 0.5.8
3
+ Version: 0.5.11
4
4
  Summary: "Code checker used in Envoy proxy's CI"
5
5
  Home-page: https://github.com/envoyproxy/toolshed/tree/main/envoy.code.check
6
6
  Author: Ryan Northey
@@ -457,7 +457,8 @@ class AExtensionsCheck(abstract.ACodeCheck, metaclass=abstracts.Abstraction):
457
457
  def _owners_extension_match_line(
458
458
  self,
459
459
  line: str,
460
- matcher: Pattern[str] = None) -> dict[str, dict[str, set]]:
460
+ matcher: Optional[
461
+ Pattern[str]] = None) -> dict[str, dict[str, set]]:
461
462
  if line.startswith('#'):
462
463
  return {}
463
464
  m = (matcher or self.codeowners_extensions_re).search(line)
@@ -1,11 +1,10 @@
1
1
 
2
2
  import io
3
3
  import pathlib
4
- import re
5
4
  from functools import cached_property, partial
6
5
  from typing import (
7
6
  AsyncIterator, Dict, Generator, Iterator, List, Optional,
8
- Pattern, Set, Tuple)
7
+ Set, Tuple)
9
8
 
10
9
  from yamllint import linter # type:ignore
11
10
  from yamllint.config import YamlLintConfig # type:ignore
@@ -23,12 +22,6 @@ from envoy.code.check import abstract, typing
23
22
 
24
23
 
25
24
  YAMLLINT_CONFIG = '.yamllint'
26
- YAMLLINT_MATCH_RE = (
27
- r"[\w/\.]*\.yml$",
28
- r"[\w/\.]*\.yaml$", )
29
- YAMLLINT_NOMATCH_RE = (
30
- r"[\w/\.]*\.template\.yaml$",
31
- r"[\w/\.]*/server_xds\.cds\.with_unknown_field\.*\.yaml$")
32
25
 
33
26
 
34
27
  @abstracts.implementer(directory.IDirectoryContext)
@@ -103,13 +96,11 @@ class AYamllintCheck(abstract.AFileCodeCheck, metaclass=abstracts.Abstraction):
103
96
 
104
97
  @async_property
105
98
  async def checker_files(self) -> Set[str]:
106
- """Files with a `.yaml` suffix, but that are not excluded."""
107
99
  return set(
108
- path
109
- for path
100
+ path for path
110
101
  in await self.directory.files
111
- if (self.path_match_re.match(path)
112
- and not self.path_match_exclude_re.match(path)))
102
+ if (self.config.is_yaml_file(path)
103
+ and not self.config.is_file_ignored(path)))
113
104
 
114
105
  @cached_property
115
106
  def config(self) -> YamlLintConfig:
@@ -119,16 +110,6 @@ class AYamllintCheck(abstract.AFileCodeCheck, metaclass=abstracts.Abstraction):
119
110
  def config_path(self) -> pathlib.Path:
120
111
  return self.directory.path.joinpath(YAMLLINT_CONFIG)
121
112
 
122
- @cached_property
123
- def path_match_re(self) -> Pattern[str]:
124
- """Regex to match files to check."""
125
- return re.compile("|".join(YAMLLINT_MATCH_RE))
126
-
127
- @cached_property
128
- def path_match_exclude_re(self) -> Pattern[str]:
129
- """Regex to match files not to check."""
130
- return re.compile("|".join(YAMLLINT_NOMATCH_RE))
131
-
132
113
  @async_property(cache=True)
133
114
  async def problem_files(self) -> "typing.ProblemDict":
134
115
  return dict(await AwaitableGenerator(self._problem_files))
@@ -42,7 +42,7 @@ class YapfCheck(abstract.AYapfCheck):
42
42
 
43
43
 
44
44
  @abstracts.implementer(abstract.AYamllintCheck)
45
- class YamllintCheck:
45
+ class YamllintCheck(abstract.AYamllintCheck):
46
46
  pass
47
47
 
48
48
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: envoy.code.check
3
- Version: 0.5.8
3
+ Version: 0.5.11
4
4
  Summary: "Code checker used in Envoy proxy's CI"
5
5
  Home-page: https://github.com/envoyproxy/toolshed/tree/main/envoy.code.check
6
6
  Author: Ryan Northey
@@ -1,5 +1,5 @@
1
1
  abstracts>=0.0.12
2
- aio.core>=0.10.0
2
+ aio.core>=0.10.1
3
3
  aio.run.checker>=0.5.7
4
4
  envoy.base.utils>=0.4.7
5
5
  flake8>=6
@@ -15,7 +15,7 @@ setup(**{
15
15
  },
16
16
  'install_requires': (
17
17
  'abstracts>=0.0.12',
18
- 'aio.core>=0.10.0',
18
+ 'aio.core>=0.10.1',
19
19
  'aio.run.checker>=0.5.7',
20
20
  'envoy.base.utils>=0.4.7',
21
21
  'flake8>=6',
@@ -46,5 +46,5 @@ Code checker used in Envoy proxy's CI
46
46
  ),
47
47
  'python_requires': '>=3.10.0',
48
48
  'url': 'https://github.com/envoyproxy/toolshed/tree/main/envoy.code.check',
49
- 'version': '0.5.8',
49
+ 'version': '0.5.11',
50
50
  })