crackerjack 0.3.3__py3-none-any.whl → 0.7.29__py3-none-any.whl

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 crackerjack might be problematic. Click here for more details.

crackerjack/.gitignore CHANGED
@@ -7,7 +7,8 @@
7
7
  /dist/
8
8
  /.mypy_cache/
9
9
  /.ruff_cache/
10
- /.crackerjack-config.yaml
11
- /.pyanalyze-report.json
12
- /.pyanalyze-report.md
13
10
  /.pdm-build/
11
+ /tmp/
12
+ /__pycache__/
13
+ /*.pyc
14
+ /.crackerjack.yaml
@@ -1,13 +1,13 @@
1
1
  repos:
2
2
  - repo: https://github.com/pdm-project/pdm
3
- rev: 2.7.4 # a PDM release exposing the hook
3
+ rev: 2.13.2 # a PDM release exposing the hook
4
4
  hooks:
5
5
  - id: pdm-lock-check
6
6
  - repo: https://github.com/pre-commit/pre-commit-hooks
7
- rev: v4.4.0
7
+ rev: v4.5.0
8
8
  hooks:
9
9
  - id: trailing-whitespace
10
- name: trailing-whitspace
10
+ name: trailing-whitespace
11
11
  - id: end-of-file-fixer
12
12
  name: end-of-file-fixer
13
13
  - id: check-yaml
@@ -17,38 +17,27 @@ repos:
17
17
  - id: check-added-large-files
18
18
  name: check-added-large-files
19
19
  - repo: https://github.com/psf/black
20
- rev: '23.3.0'
20
+ rev: '24.3.0'
21
21
  hooks:
22
22
  - id: black
23
- language_version: python3.11
24
23
  - repo: https://github.com/charliermarsh/ruff-pre-commit
25
- rev: v0.0.272
24
+ rev: v0.3.5
26
25
  hooks:
27
26
  - id: ruff
28
27
  - repo: https://github.com/fredrikaverpil/creosote
29
- rev: v2.6.2
28
+ rev: v3.0.0
30
29
  hooks:
31
30
  - id: creosote
32
- args: [--paths, "crackerjack", --exclude-deps, "pdm-bump", "tomli-w"]
33
31
  - repo: https://github.com/ikamensh/flynt/
34
- rev: '0.78'
32
+ rev: '1.0.1'
35
33
  hooks:
36
34
  - id: flynt
37
35
  - repo: https://github.com/codespell-project/codespell
38
- rev: v2.2.4
36
+ rev: v2.2.6
39
37
  hooks:
40
38
  - id: codespell
41
39
  additional_dependencies:
42
40
  - tomli
43
- - repo: local
44
- hooks:
45
- - id: pyanalyze
46
- name: pyanalyze
47
- entry: python -m pyanalyze
48
- language: python
49
- files: \.py$
50
- additional_dependencies:
51
- - pyanalyze>=0.10.1
52
41
  - repo: local
53
42
  hooks:
54
43
  - id: autotyping
@@ -60,7 +49,6 @@ repos:
60
49
  - --show-successes
61
50
  - --include-generated
62
51
  - --guess-common-names
63
- - --pyanalyze-report '.pyanalyze-report.json',
64
52
  - crackerjack
65
53
  types_or: [ python, pyi ]
66
54
  language: python
@@ -69,13 +57,26 @@ repos:
69
57
  - autotyping>=23.3.0
70
58
  - libcst>=0.4.9
71
59
  - repo: https://github.com/dosisod/refurb
72
- rev: v1.16.0
60
+ rev: v2.0.0
73
61
  hooks:
74
62
  - id: refurb
63
+ - repo: https://github.com/PyCQA/bandit
64
+ rev: '1.7.8'
65
+ hooks:
66
+ - id: bandit
67
+ args: ["-c", "pyproject.toml"]
75
68
  - repo: https://github.com/RobertCraigie/pyright-python
76
- rev: v1.1.313
69
+ rev: v1.1.356
77
70
  hooks:
78
71
  - id: pyright
72
+ - repo: https://github.com/charliermarsh/ruff-pre-commit
73
+ rev: v0.3.5
74
+ hooks:
75
+ - id: ruff
76
+ - repo: https://github.com/psf/black
77
+ rev: '24.3.0'
78
+ hooks:
79
+ - id: black
79
80
  # - repo: https://github.com/pdoc3/pdoc
80
81
  # rev: master
81
82
  # hooks:
@@ -86,18 +87,3 @@ repos:
86
87
  # require_serial: true
87
88
  # types: [ python ]
88
89
  # always_run: true
89
- - repo: https://github.com/charliermarsh/ruff-pre-commit
90
- rev: v0.0.272
91
- hooks:
92
- - id: ruff
93
- - repo: https://github.com/psf/black
94
- rev: '23.3.0'
95
- hooks:
96
- - id: black
97
- language_version: python3.11
98
- - repo: https://github.com/pdm-project/pdm
99
- rev: 2.7.4 # a PDM release exposing the hook
100
- hooks:
101
- - id: pdm-export
102
- args: [ '-o', 'requirements.txt', '--without-hashes' ]
103
- files: ^pdm.lock$
crackerjack/__main__.py CHANGED
@@ -1,4 +1,5 @@
1
1
  import asyncio
2
+ import typing as t
2
3
 
3
4
  from click import command
4
5
  from click import help_option
@@ -12,7 +13,8 @@ class Options(BaseModel):
12
13
  interactive: bool = False
13
14
  doc: bool = False
14
15
  do_not_update_configs: bool = False
15
- publish: str | bool = False
16
+ publish: t.Literal["micro", "minor", "major"] | bool = False
17
+ bump: t.Literal["micro", "minor", "major"] | bool = False
16
18
  verbose: bool = False
17
19
  update_precommit: bool = False
18
20
 
@@ -28,9 +30,19 @@ options = Options()
28
30
  @option("-x", is_flag=True, help="do not update configs")
29
31
  @option("-u", is_flag=True, help="update pre-commit")
30
32
  @option("-v", is_flag=True, help="verbose")
31
- @option("-p", help="publish: -p [micro, minor, major]")
33
+ @option("-p", help="bump version and publish: -p [micro, minor, major]")
34
+ @option("-b", help="bump version: -b [micro, minor, major]")
32
35
  # @option("-f", help="format: -f [module]")
33
- def crackerjack(c: bool, i: bool, d: bool, u: bool, v: bool, x: bool, p: str) -> None:
36
+ def crackerjack(
37
+ c: bool = False,
38
+ i: bool = False,
39
+ d: bool = False,
40
+ u: bool = False,
41
+ v: bool = False,
42
+ x: bool = False,
43
+ p: str | bool = False,
44
+ b: str | bool = False,
45
+ ) -> None:
34
46
  if c:
35
47
  options.commit = c
36
48
  if i:
@@ -43,10 +55,12 @@ def crackerjack(c: bool, i: bool, d: bool, u: bool, v: bool, x: bool, p: str) ->
43
55
  options.do_not_update_configs = x
44
56
  if p in ("micro", "minor", "major"):
45
57
  options.publish = p
58
+ if b in ("micro", "minor", "major"):
59
+ options.bump = b
46
60
  if v:
47
61
  print("-v not currently implemented")
48
62
  options.verbose = v
49
- asyncio.run(crackerjack_it(options))
63
+ asyncio.run(crackerjack_it(options=options))
50
64
 
51
65
 
52
66
  if __name__ == "__main__":
@@ -1,149 +1,195 @@
1
1
  import asyncio
2
+ import re
2
3
  import sys
3
4
  import typing as t
4
- from subprocess import call
5
- from subprocess import check_output
5
+ from pathlib import Path
6
6
  from subprocess import run
7
7
 
8
- from acb.actions import dump
9
- from acb.actions import load
10
-
8
+ from acb.actions.encode import dump
9
+ from acb.actions.encode import load
11
10
  from aioconsole import ainput
11
+ from aioconsole import aprint
12
12
  from aiopath import AsyncPath
13
13
  from inflection import underscore
14
14
  from pydantic import BaseModel
15
- from pydantic import ConfigDict
16
15
 
17
16
 
18
- class Crakerjack(BaseModel):
19
- model_config = ConfigDict(arbitrary_types_allowed=True)
20
- our_path: AsyncPath = AsyncPath(__file__)
21
- pkg_path: AsyncPath = AsyncPath.cwd()
17
+ class Config(BaseModel):
18
+ python_version: t.Optional[str] = None
19
+ pre_commit_path: t.Optional[Path] = None
20
+ git_path: t.Optional[Path] = None
21
+ pdm_path: t.Optional[Path] = None
22
+ zshenv_path: t.Optional[Path] = None
23
+
24
+
25
+ class Crackerjack(BaseModel, arbitrary_types_allowed=True):
26
+ our_path: AsyncPath = AsyncPath(__file__).parent
27
+ pkg_path: AsyncPath = AsyncPath(Path.cwd())
28
+ settings_path: AsyncPath = pkg_path / ".crackerjack.yaml"
22
29
  pkg_dir: t.Optional[AsyncPath] = None
23
30
  pkg_name: str = "crackerjack"
24
- our_toml: t.Optional[dict] = None
25
- pkg_toml: t.Optional[dict] = None
31
+ our_toml: t.Optional[dict[str, t.Any]] = None
32
+ pkg_toml: t.Optional[dict[str, t.Any]] = None
26
33
  our_toml_path: t.Optional[AsyncPath] = None
27
34
  pkg_toml_path: t.Optional[AsyncPath] = None
28
- poetry_pip_env: bool = False
35
+ config: t.Optional[Config] = None
29
36
 
30
37
  async def update_pyproject_configs(self) -> None:
31
38
  toml_file = "pyproject.toml"
32
- self.our_toml_path = self.our_path.parent / toml_file
39
+ self.our_toml_path = self.our_path / toml_file
33
40
  self.pkg_toml_path = self.pkg_path / toml_file
41
+ if self.pkg_path.stem == "crackerjack":
42
+ await self.our_toml_path.write_text(await self.pkg_toml_path.read_text())
43
+ return
34
44
  our_toml_config: t.Any = await load.toml(self.our_toml_path) # type: ignore
35
45
  pkg_toml_config: t.Any = await load.toml(self.pkg_toml_path) # type: ignore
36
- if self.poetry_pip_env:
37
- pkg_toml_config["tool"].pop("poetry")
38
46
  pkg_deps = pkg_toml_config["tool"]["pdm"]["dev-dependencies"]
39
- pkg_toml_config["tool"] = our_toml_config["tool"]
40
- for settings in pkg_toml_config["tool"].values():
47
+ for tool, settings in our_toml_config["tool"].items():
41
48
  for setting, value in settings.items():
42
49
  if isinstance(value, str | list) and "crackerjack" in value:
43
- if isinstance(value, str):
44
- value = value.replace("crackerjack", self.pkg_name)
45
- else:
50
+ if isinstance(value, list):
46
51
  value.remove("crackerjack")
47
52
  value.append(self.pkg_name)
53
+ else:
54
+ value = value.replace("crackerjack", self.pkg_name)
48
55
  settings[setting] = value
56
+ if setting in (
57
+ "exclude-deps",
58
+ "exclude",
59
+ "excluded",
60
+ "skips",
61
+ "ignore",
62
+ ) and isinstance(value, list):
63
+ settings[setting] = set(
64
+ pkg_toml_config["tool"][tool][setting] + value
65
+ )
66
+ pkg_toml_config["tool"][tool] = settings
49
67
  pkg_toml_config["tool"]["pdm"]["dev-dependencies"] = pkg_deps
50
- if self.pkg_path.stem == "crackerjack":
51
- await dump.toml(pkg_toml_config, self.our_toml_path) # type: ignore
52
- else:
53
- await dump.toml(pkg_toml_config, self.pkg_toml_path) # type: ignore
54
-
55
- async def clean_poetry_pipenv(self) -> None:
56
- root_files = [
57
- file
58
- async for file in self.pkg_path.iterdir()
59
- if ("poetry" or "Pip") in file.name
60
- ]
61
- if root_files:
62
- self.poetry_pip_env = True
63
- for file in root_files:
64
- await file.unlink()
68
+ python_version_pattern = r"\s*W*(\d\.\d*)"
69
+ requires_python = our_toml_config["project"]["requires-python"]
70
+ classifiers = []
71
+ for classifier in pkg_toml_config["project"]["classifiers"]:
72
+ classifier = re.sub(
73
+ python_version_pattern, f" {self.config.python_version}", classifier
74
+ )
75
+ classifiers.append(classifier)
76
+ pkg_toml_config["project"]["classifiers"] = classifiers
77
+ pkg_toml_config["project"]["requires-python"] = requires_python
78
+ await dump.toml(pkg_toml_config, self.pkg_toml_path) # type: ignore
65
79
 
66
80
  async def copy_configs(self) -> None:
67
81
  config_files = (
68
82
  ".gitignore",
69
83
  ".pre-commit-config.yaml",
70
84
  ".libcst.codemod.yaml",
71
- ".crackerjack-config.yaml",
72
- ".pyanalyze-report.json",
73
- ".pyanalyze-report.md",
74
85
  )
75
86
  for config in config_files:
76
- config_path = self.our_path.parent / config
87
+ config_path = self.our_path / config
77
88
  pkg_config_path = self.pkg_path / config
78
89
  await pkg_config_path.touch(exist_ok=True)
79
- if config in config_files[:-2]:
80
- if self.pkg_path.stem == "crackerjack":
81
- await config_path.write_text(await pkg_config_path.read_text())
82
- # if poetry_pip_env:
83
- # await config_pkg_path.unlink()
84
- config_text = await config_path.read_text()
90
+ if self.pkg_path.stem == "crackerjack":
91
+ await config_path.write_text(await pkg_config_path.read_text())
92
+ continue
93
+ config_text = await config_path.read_text()
94
+ if config == ".gitignore":
85
95
  await pkg_config_path.write_text(
86
96
  config_text.replace("crackerjack", self.pkg_name)
87
97
  )
88
- run(["git", "add", config])
98
+ run([str(self.config.git_path), "add", config])
89
99
 
90
- @staticmethod
91
- async def run_interactive(hook: str) -> None:
92
- success = False
100
+ async def run_interactive(self, hook: str) -> None:
101
+ success: bool = False
93
102
  while not success:
94
- fail = call(["pre-commit", "run", hook.lower(), "--all-files"])
95
- if fail > 0:
96
- retry = await ainput(f"\n{hook} failed. Retry? (y/n): ")
97
- if retry.lower() == "y":
103
+ fail = run(
104
+ [str(self.config.pre_commit_path), "run", hook.lower(), "--all-files"]
105
+ )
106
+ if fail.returncode > 0:
107
+ retry = await ainput(f"\n\n{hook.title()} failed. Retry? (y/N): ")
108
+ await aprint()
109
+ if retry.strip().lower() == "y":
98
110
  continue
99
111
  sys.exit()
100
112
  success = True
101
113
 
102
114
  async def update_pkg_configs(self) -> None:
103
- await self.clean_poetry_pipenv()
104
115
  await self.copy_configs()
105
- installed_pkgs = check_output(
106
- ["pdm", "list", "--freeze"],
107
- universal_newlines=True,
108
- ).splitlines()
116
+ installed_pkgs = run(
117
+ [str(self.config.pdm_path), "list", "--freeze"],
118
+ capture_output=True,
119
+ text=True,
120
+ ).stdout.splitlines()
109
121
  if not len([pkg for pkg in installed_pkgs if "pre-commit" in pkg]):
110
- run(["pdm", "self", "add", "keyring"])
111
- run(["pdm", "config", "python.use_venv", "false"])
112
- run(["git", "init"])
113
- run(["git", "branch", "-m", "main"])
114
- run(["git", "add", "pyproject.toml"])
115
- run(["pdm", "add", "-d", "pre_commit"])
116
- run(["pre-commit", "install"])
117
- run(["git", "add", "pdm.lock"])
118
- run(["git", "config advice.addIgnoredFile", "false"])
122
+ print('Installing "pre-commit"...')
123
+ run([str(self.config.pdm_path), "self", "add", "keyring"])
124
+ run([str(self.config.pdm_path), "config", "python.use_venv", "false"])
125
+ run([str(self.config.git_path), "init"])
126
+ run([str(self.config.git_path), "branch", "-m", "main"])
127
+ run([str(self.config.git_path), "add", "pyproject.toml"])
128
+ run([str(self.config.git_path), "add", "pdm.lock"])
129
+ run([str(self.config.pre_commit_path), "install"])
130
+ run(
131
+ [
132
+ str(self.config.git_path),
133
+ "config",
134
+ "advice.addIgnoredFile",
135
+ "false",
136
+ ]
137
+ )
119
138
  await self.update_pyproject_configs()
120
139
 
121
140
  async def process(self, options: t.Any) -> None:
122
- imp_dir = self.pkg_path / "__pypackages__"
141
+ await self.settings_path.touch(exist_ok=True)
142
+ try:
143
+ self.config = Config(**await load.yaml(self.settings_path))
144
+ except TypeError:
145
+ self.config = Config()
146
+ await dump.yaml(self.config.model_dump(), self.settings_path)
147
+ raise SystemExit("\nPlease configure '.crackerjack.yaml' and try again\n")
148
+ imp_dir = self.pkg_path / "__pypackages__" / self.config.python_version / "lib"
123
149
  sys.path.append(str(imp_dir))
124
150
  self.pkg_name = underscore(self.pkg_path.stem.lower())
125
151
  self.pkg_dir = self.pkg_path / self.pkg_name
126
152
  await self.pkg_dir.mkdir(exist_ok=True)
127
- print("\nCrackerjacking...\n")
128
- if self.pkg_path.stem == "crackerjack" and options.update_precommit:
129
- run(["pre-commit", "autoupdate"])
130
- await asyncio.create_subprocess_shell('eval "$(pdm --pep582)"')
131
- if options.publish:
132
- check_output(["pdm", "bump", options.publish])
153
+ await aprint("\nCrackerjacking...\n")
133
154
  if not options.do_not_update_configs:
134
155
  await self.update_pkg_configs()
156
+ run([str(self.config.pdm_path), "install"])
157
+ if self.pkg_path.stem == "crackerjack" and options.update_precommit:
158
+ run([str(self.config.pre_commit_path), "autoupdate"])
135
159
  if options.interactive:
136
- for hook in ("refurb", "pyright"):
160
+ for hook in ("refurb", "bandit", "pyright"):
137
161
  await self.run_interactive(hook)
138
- check_all = call(["pre-commit", "run", "--all-files"])
139
- if check_all > 0:
140
- call(["pre-commit", "run", "--all-files"])
162
+ check_all = run([str(self.config.pre_commit_path), "run", "--all-files"])
163
+ if check_all.returncode > 0:
164
+ check_all = run([str(self.config.pre_commit_path), "run", "--all-files"])
165
+ if check_all.returncode > 0:
166
+ await aprint("\n\nPre-commit failed. Please fix errors.\n")
167
+ raise SystemExit()
168
+ for option in (options.publish, options.bump):
169
+ if option:
170
+ run([str(self.config.pdm_path), "bump", option])
171
+ break
141
172
  if options.publish:
142
- run(["pdm", "publish"])
173
+ run([str(self.config.pdm_path), "publish"])
143
174
  if options.commit:
144
- commit_msg = input("Commit message: ")
145
- call(["git", "commit", "-m", f"'{commit_msg}'", "--no-verify", "--", "."])
146
- call(["git", "push", "origin", "main"])
175
+ commit_msg = await ainput("\nCommit message: ")
176
+ run(
177
+ [
178
+ str(self.config.git_path),
179
+ "commit",
180
+ "-m",
181
+ str(commit_msg),
182
+ "--no-verify",
183
+ "--",
184
+ ".",
185
+ ]
186
+ )
187
+ run([str(self.config.git_path), "push", "origin", "main"])
188
+ await aprint("\nCrackerjack complete!\n")
189
+
190
+ async def run(self, options: t.Any) -> None:
191
+ process = asyncio.create_task(self.process(options))
192
+ await process
147
193
 
148
194
 
149
- crackerjack_it = Crakerjack().process
195
+ crackerjack_it = Crackerjack().run
@@ -1,52 +1,90 @@
1
- [tool.pdm.dev-dependencies]
2
- dev = [
3
- "pytest>=7.3.2",
4
- "icecream>=2.1.3",
5
- "pre-commit>=3.3.2",
1
+ [tool.pdm.options]
2
+ config = [
3
+ "python.use_venv",
4
+ "true",
6
5
  ]
7
6
 
7
+ [tool.pdm.dev-dependencies]
8
+ dev = []
9
+
10
+ [tool.codespell]
11
+ skip = "*/data/*"
12
+ quiet-level = 3
13
+ ignore-words-list = "crate,uptodate"
14
+
8
15
  [tool.ruff]
9
16
  line-length = 88
10
- target-version = "py311"
17
+ target-version = "py312"
11
18
  fix = true
12
19
  show-fixes = true
13
- show-source = true
20
+ output-format = "full"
14
21
 
15
- [tool.ruff.isort]
22
+ [tool.ruff.lint]
23
+ ignore = ["F821"]
24
+
25
+ [tool.ruff.lint.isort]
16
26
  force-single-line = true
17
27
 
18
- [tool.ruff.mccabe]
28
+ [tool.ruff.lint.mccabe]
19
29
  max-complexity = 10
20
30
 
21
- [tool.ruff.pydocstyle]
31
+ [tool.ruff.lint.pydocstyle]
22
32
  convention = "google"
23
33
 
24
34
  [tool.black]
25
35
  target-version = [
26
- "py311",
36
+ "py312",
37
+ ]
38
+
39
+ [tool.creosote]
40
+ paths = [
41
+ "crackerjack",
42
+ ]
43
+ deps-file = "pyproject.toml"
44
+ exclude-deps = [
45
+ "pdm-bump",
46
+ "autotyping",
47
+ "pre-commit",
48
+ "pytest",
49
+ "pdm",
27
50
  ]
28
51
 
29
52
  [tool.refurb]
30
53
  enable_all = true
31
54
 
32
- [tool.pyanalyze]
33
- paths = [
55
+ [tool.bandit]
56
+ target = [
34
57
  "crackerjack",
35
58
  ]
59
+ skips = [
60
+ "B404",
61
+ "B603",
62
+ ]
36
63
 
37
64
  [tool.pyright]
65
+ verboseOutput = true
38
66
  include = [
39
67
  "crackerjack",
40
68
  ]
41
- reportMissingImports = true
69
+ extraPaths = [
70
+ "__pypackages__/3.12/lib/",
71
+ ]
72
+ typeCheckingMode = "strict"
42
73
  reportMissingTypeStubs = false
43
- pythonVersion = "3.11"
74
+ reportOptionalMemberAccess = false
75
+ reportOptionalCall = false
76
+ reportUnknownMemberType = false
77
+ reportUnknownVariableType = false
78
+ reportUnknownArgumentType = false
79
+ reportPrivateUsage = "warning"
80
+ pythonVersion = "3.12"
81
+ pythonPlatform = "Darwin"
44
82
 
45
83
  [project]
46
84
  name = "Crackerjack"
47
- version = "0.3.3"
85
+ version = "0.7.28"
48
86
  description = "Crackerjack code style"
49
- requires-python = ">=3.11"
87
+ requires-python = ">=3.12"
50
88
  readme = "README.md"
51
89
  keywords = [
52
90
  "black",
@@ -59,17 +97,28 @@ classifiers = [
59
97
  "Environment :: Console",
60
98
  "Operating System :: OS Independent",
61
99
  "Programming Language :: Python",
62
- "Programming Language :: Python :: 3.11",
100
+ "Programming Language :: Python :: 3.12",
101
+ "Development Status :: 4 - Beta",
102
+ "Topic :: Software Development :: Libraries :: Python Modules",
103
+ "Topic :: Software Development :: Quality Assurance",
104
+ "Topic :: Software Development :: Testing",
105
+ "Topic :: Utilities",
106
+ "Topic :: Software Development :: Libraries :: Python Modules",
107
+ "License :: OSI Approved :: BSD License",
108
+ "Typing :: Typed",
63
109
  ]
64
110
  dependencies = [
65
- "click>=8.1.3",
66
- "aiopath>=0.6.11",
67
- "aioconsole>=0.6.1",
68
- "pydantic>=2.0b2",
111
+ "click>=8.1.7",
112
+ "aioconsole>=0.7.0",
69
113
  "inflection>=0.5.1",
70
- "acb>=0.1.8",
71
- "tomli-w>=1.0.0",
72
- "pdm-bump>=0.7.0",
114
+ "autotyping>=23.3.0",
115
+ "pre-commit>=3.6.0",
116
+ "pytest>=7.4.3",
117
+ "pydantic>=2.5.3",
118
+ "aiopath>=0.7.7",
119
+ "acb>=0.4.0",
120
+ "pdm-bump>=0.7.3",
121
+ "pdm>=2.12.3",
73
122
  ]
74
123
  authors = [
75
124
  { name = "lesleslie", email = "les@wedgwoodwebworks.com" },
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
- Name: crackerjack
3
- Version: 0.3.3
2
+ Name: Crackerjack
3
+ Version: 0.7.29
4
4
  Summary: Crackerjack code style
5
5
  Keywords: black ruff mypy creosote refurb
6
6
  Home-page: https://github.com/lesleslie/crackerjack
@@ -10,27 +10,39 @@ License: BSD-3-Clause
10
10
  Classifier: Environment :: Console
11
11
  Classifier: Operating System :: OS Independent
12
12
  Classifier: Programming Language :: Python
13
- Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
16
+ Classifier: Topic :: Software Development :: Quality Assurance
17
+ Classifier: Topic :: Software Development :: Testing
18
+ Classifier: Topic :: Utilities
19
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
+ Classifier: License :: OSI Approved :: BSD License
21
+ Classifier: Typing :: Typed
14
22
  Project-URL: Homepage, https://github.com/lesleslie/crackerjack
15
23
  Project-URL: Documentation, https://github.com/lesleslie/crackerjack
16
24
  Project-URL: Repository, https://github.com/lesleslie/crackerjack
17
- Requires-Python: >=3.11
18
- Requires-Dist: click>=8.1.3
19
- Requires-Dist: aiopath>=0.6.11
20
- Requires-Dist: aioconsole>=0.6.1
21
- Requires-Dist: pydantic>=2.0b2
25
+ Requires-Python: >=3.12
26
+ Requires-Dist: click>=8.1.7
27
+ Requires-Dist: aioconsole>=0.7.0
22
28
  Requires-Dist: inflection>=0.5.1
23
- Requires-Dist: acb>=0.1.8
24
- Requires-Dist: tomli-w>=1.0.0
25
- Requires-Dist: pdm-bump>=0.7.0
29
+ Requires-Dist: autotyping>=23.3.0
30
+ Requires-Dist: pre-commit>=3.6.0
31
+ Requires-Dist: pytest>=7.4.3
32
+ Requires-Dist: pydantic>=2.5.3
33
+ Requires-Dist: aiopath>=0.7.7
34
+ Requires-Dist: acb>=0.4.0
35
+ Requires-Dist: pdm-bump>=0.7.3
36
+ Requires-Dist: pdm>=2.12.3
26
37
  Description-Content-Type: text/markdown
27
38
 
28
39
  # Crackerjack Python
29
40
 
30
- [![Python: 3.11](https://img.shields.io/badge/python-3.11%2B-blue)](https://docs.python.org/3/)
41
+ [![Python: 3.12](https://img.shields.io/badge/python-3.12%2B-blue)](https://docs.python.org/3/)
31
42
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
32
43
  [![Checked with pyright](https://microsoft.github.io/pyright/img/pyright_badge.svg)](https://microsoft.github.io/pyright/)
33
44
  [![pdm-managed](https://img.shields.io/badge/pdm-managed-blueviolet)](https://pdm.fming.dev)
45
+ [![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)
34
46
  [![Code style: crackerjack](https://img.shields.io/badge/code%20style-crackerjack-000042)](https://github.com/lesleslie/crackerjack)
35
47
 
36
48
  Crackerjack is a python coding style which uses a minimalist approach to produce elegant, easy to read, code.
@@ -80,22 +92,21 @@ This package:
80
92
 
81
93
  - streamlines and standardizes code style across numerous packages
82
94
 
83
- - removes pipenv, poetry, and hatch build, dependency management, and virtual environment
84
- management packages and replaces them with PDM using PEP-582 (work in progress)
85
-
86
95
  - installs, or updates, a project's pre-commit tools as well as .gitignore & other config files
87
96
  to comply with evolving crackerjack standards
88
97
 
89
98
  - runs the following pre-commit hooks (in order):
90
- * various core pre-commit hooks
91
- * [black](https://github.com/ambv/black)
92
- * ruff
93
- * creosote
94
- * flynt
95
- * pyanalyze
96
- * autotyping
97
- * refurb
98
- * pyright
99
+ * [pdm-lock-check](https://github.com/pdm-project/pdm)
100
+ * various core [pre-commit-hooks](https://github.com/pre-commit/pre-commit-hooks)
101
+ * [black](https://github.com/psf/black)
102
+ * [ruff](https://github.com/charliermarsh/ruff-pre-commit)
103
+ * [creosote](https://github.com/fredrikaverpil/creosote)
104
+ * [flynt](https://github.com/ikamensh/flynt/)
105
+ * [codespell](https://github.com/codespell-project/codespell)
106
+ * [autotyping](https://github.com/JelleZijlstra/autotyping)
107
+ * [refurb](https://github.com/dosisod/refurb)
108
+ * [bandit](https://github.com/PyCQA/bandit)
109
+ * [pyright](https://github.com/RobertCraigie/pyright-python)
99
110
  * ruff (again for sanity checking)
100
111
  * black (again for sanity checking)
101
112
 
@@ -126,11 +137,9 @@ This package:
126
137
 
127
138
  - functions that deal with path operations should get passed AsyncPaths or Paths - not strings
128
139
 
129
- - if a class can be a dataclasses.dataclass, pydantic.BaseModel, or msgspec.Struct it should be
130
-
131
140
  - force single line imports (will support isort Vertical Hanging Indent when ruff does)
132
141
 
133
- - use PDM and PEP-582 for dependency management and package building/publishing
142
+ - use PDM and PEP-582(proposed) for dependency management and package building/publishing
134
143
 
135
144
  - use pdoc and mkdocs for producing documentation
136
145
 
@@ -0,0 +1,26 @@
1
+ crackerjack-0.7.29.dist-info/METADATA,sha256=rPldak5GIm9ptTpJ0kPhLpzgRiYSPEhTRoI5OVG4Vo0,7742
2
+ crackerjack-0.7.29.dist-info/WHEEL,sha256=N2J68yzZqJh3mI_Wg92rwhw0rtJDFpZj9bwQIMJgaVg,90
3
+ crackerjack-0.7.29.dist-info/licenses/LICENSE,sha256=fDt371P6_6sCu7RyqiZH_AhT1LdN3sN1zjBtqEhDYCk,1531
4
+ crackerjack/.gitignore,sha256=aJ2x3-AcCEcaW_quI-j8RtOUcTqGNoLJGMq8mZ3lTrA,197
5
+ crackerjack/.libcst.codemod.yaml,sha256=TLE_I07llPTYk_tm36z-hN15O3X27qztNdJ3Ev9ODMk,768
6
+ crackerjack/.pre-commit-config.yaml,sha256=Y8EFw0PTePW-7a-cfL9o1A3koZ13mNTShvPekNXv7wQ,2396
7
+ crackerjack/.ruff_cache/.gitignore,sha256=aEiIwOuxfzdCmLZe4oB1JsBmCUxwG8x-u-HBCV9JT8E,1
8
+ crackerjack/.ruff_cache/0.1.11/3256171999636029978,sha256=-RLDsRf5uj09SyFQVzjwQ1HkTxjIRxNLLE24SEJxD4g,248
9
+ crackerjack/.ruff_cache/0.1.14/602324811142551221,sha256=HIYvldb69IHdMzquAA8JpzU2RDT9shEB_dPvzyeFZ_g,248
10
+ crackerjack/.ruff_cache/0.1.4/10355199064880463147,sha256=kmqNg5WySQYPeAqa5elfaV7yjdWQ1xAImpeuzglAqnE,248
11
+ crackerjack/.ruff_cache/0.1.6/15140459877605758699,sha256=oQy5boAXeskdm5M0Abh_nyBtitWj5N5wtx_4gsDgu7c,248
12
+ crackerjack/.ruff_cache/0.1.7/1790508110482614856,sha256=De7Puq32XF0925xrGehWSKX6cw5Wi2bpt1cnqh__f54,248
13
+ crackerjack/.ruff_cache/0.1.9/17041001205004563469,sha256=tKP_k8HaHhQJyrHbDfJ93kM7vahjrU8cKQ1f_-OUzZY,248
14
+ crackerjack/.ruff_cache/0.2.0/10047773857155985907,sha256=j9LNa_RQ4Plor7go1uTYgz17cEENKvZQ-dP6b9MX0ik,248
15
+ crackerjack/.ruff_cache/0.2.1/8522267973936635051,sha256=u_aPBMibtAp_iYvLwR88GMAECMcIgHezxMyuapmU2P4,248
16
+ crackerjack/.ruff_cache/0.2.2/18053836298936336950,sha256=Xb_ebP0pVuUfSqPEZKlhQ70so_vqkEfMYpuHQ06iR5U,248
17
+ crackerjack/.ruff_cache/0.3.0/12548816621480535786,sha256=TAZaMTWC-6O3eZXnWVsQgaKtVPew0QbrAFOWz96hK6g,248
18
+ crackerjack/.ruff_cache/0.3.3/11081883392474770722,sha256=S9jhv2NNJwv6bi0JqfBMWcpMktP2A0ikJerra779HKM,248
19
+ crackerjack/.ruff_cache/0.3.4/676973378459347183,sha256=qQXG3ByXNuDvpqAhrhjcQVJYeuyS1cBjIxyGgFlT6NI,248
20
+ crackerjack/.ruff_cache/0.3.5/16311176246009842383,sha256=1jdzqow8vaK7V6TGKnAFbiL-JUeOUjP8XgYifP1Tg5s,248
21
+ crackerjack/.ruff_cache/CACHEDIR.TAG,sha256=WVMVbX4MVkpCclExbq8m-IcOZIOuIZf5FrYw5Pk-Ma4,43
22
+ crackerjack/__init__.py,sha256=AuglbbJHkUJ2GdvyT0ca35ntexo1RkT2V6DgypoFeEk,121
23
+ crackerjack/__main__.py,sha256=hsMAXG2BglqSaHsVd8Vsyh7Mb5dHcLjvBy4ofgo0NyY,1800
24
+ crackerjack/crackerjack.py,sha256=TKNfpJSBInKrUbOba9BC6F2MM9o49QuPC-FioxEJnZo,8211
25
+ crackerjack/pyproject.toml,sha256=yKJ7JRMg3fE8fGnEyOw4tV7i95iQ7rDn3Y8_cwpuKm8,2740
26
+ crackerjack-0.7.29.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: pdm-backend (2.1.0)
2
+ Generator: pdm-backend (2.1.8)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
File without changes
@@ -1,92 +0,0 @@
1
- [
2
- {
3
- "description": "Object of type bytes does not support '__setitem__'",
4
- "filename": "crackerjack/crackerjack.py",
5
- "absolute_filename": "/Users/les/Projects/crackerjack/crackerjack/crackerjack.py",
6
- "code": "unsupported_operation",
7
- "lineno": 46,
8
- "col_offset": 8,
9
- "context": " 43: if self.poetry_pip_env:\n 44: del pkg_toml_config[\"tool\"][\"poetry\"]\n 45: pkg_deps = pkg_toml_config[\"tool\"][\"pdm\"][\"dev-dependencies\"]\n 46: pkg_toml_config[\"tool\"] = our_toml_config[\"tool\"]\n ^\n 47: for tool, settings in pkg_toml_config[\"tool\"].items():\n 48: for setting, value in settings.items():\n 49: if isinstance(value, str | list) and \"crackerjack\" in value:\n",
10
- "message": "\nObject of type bytes does not support '__setitem__' (code: unsupported_operation)\nIn crackerjack/crackerjack.py at line 46\n 43: if self.poetry_pip_env:\n 44: del pkg_toml_config[\"tool\"][\"poetry\"]\n 45: pkg_deps = pkg_toml_config[\"tool\"][\"pdm\"][\"dev-dependencies\"]\n 46: pkg_toml_config[\"tool\"] = our_toml_config[\"tool\"]\n ^\n 47: for tool, settings in pkg_toml_config[\"tool\"].items():\n 48: for setting, value in settings.items():\n 49: if isinstance(value, str | list) and \"crackerjack\" in value:\n"
11
- },
12
- {
13
- "description": "Cannot call overloaded function",
14
- "filename": "crackerjack/crackerjack.py",
15
- "absolute_filename": "/Users/les/Projects/crackerjack/crackerjack/crackerjack.py",
16
- "code": "incompatible_argument",
17
- "lineno": 44,
18
- "col_offset": 16,
19
- "context": " 41: our_toml_config = await load.toml(self.our_toml_path) # type: ignore\n 42: pkg_toml_config = await load.toml(self.pkg_toml_path) # type: ignore\n 43: if self.poetry_pip_env:\n 44: del pkg_toml_config[\"tool\"][\"poetry\"]\n ^\n 45: pkg_deps = pkg_toml_config[\"tool\"][\"pdm\"][\"dev-dependencies\"]\n 46: pkg_toml_config[\"tool\"] = our_toml_config[\"tool\"]\n 47: for tool, settings in pkg_toml_config[\"tool\"].items():\n",
20
- "message": "\nCannot call overloaded function (code: incompatible_argument)\n In overload (self, key: typing_extensions.SupportsIndex (Protocol with members '__index__'), /) -> int\n Incompatible argument type for key: expected typing_extensions.SupportsIndex (Protocol with members '__index__') but got Literal['tool']\n Literal['tool'] has no attribute '__index__'\n\n In overload (self, key: slice, /) -> bytes\n Incompatible argument type for key: expected slice but got Literal['tool']\n Cannot assign Literal['tool'] to slice\n\n\nIn crackerjack/crackerjack.py at line 44\n 41: our_toml_config = await load.toml(self.our_toml_path) # type: ignore\n 42: pkg_toml_config = await load.toml(self.pkg_toml_path) # type: ignore\n 43: if self.poetry_pip_env:\n 44: del pkg_toml_config[\"tool\"][\"poetry\"]\n ^\n 45: pkg_deps = pkg_toml_config[\"tool\"][\"pdm\"][\"dev-dependencies\"]\n 46: pkg_toml_config[\"tool\"] = our_toml_config[\"tool\"]\n 47: for tool, settings in pkg_toml_config[\"tool\"].items():\n"
21
- },
22
- {
23
- "description": "Cannot call overloaded function",
24
- "filename": "crackerjack/crackerjack.py",
25
- "absolute_filename": "/Users/les/Projects/crackerjack/crackerjack/crackerjack.py",
26
- "code": "incompatible_argument",
27
- "lineno": 45,
28
- "col_offset": 19,
29
- "context": " 42: pkg_toml_config = await load.toml(self.pkg_toml_path) # type: ignore\n 43: if self.poetry_pip_env:\n 44: del pkg_toml_config[\"tool\"][\"poetry\"]\n 45: pkg_deps = pkg_toml_config[\"tool\"][\"pdm\"][\"dev-dependencies\"]\n ^\n 46: pkg_toml_config[\"tool\"] = our_toml_config[\"tool\"]\n 47: for tool, settings in pkg_toml_config[\"tool\"].items():\n 48: for setting, value in settings.items():\n",
30
- "message": "\nCannot call overloaded function (code: incompatible_argument)\n In overload (self, key: typing_extensions.SupportsIndex (Protocol with members '__index__'), /) -> int\n Incompatible argument type for key: expected typing_extensions.SupportsIndex (Protocol with members '__index__') but got Literal['tool']\n Literal['tool'] has no attribute '__index__'\n\n In overload (self, key: slice, /) -> bytes\n Incompatible argument type for key: expected slice but got Literal['tool']\n Cannot assign Literal['tool'] to slice\n\n\nIn crackerjack/crackerjack.py at line 45\n 42: pkg_toml_config = await load.toml(self.pkg_toml_path) # type: ignore\n 43: if self.poetry_pip_env:\n 44: del pkg_toml_config[\"tool\"][\"poetry\"]\n 45: pkg_deps = pkg_toml_config[\"tool\"][\"pdm\"][\"dev-dependencies\"]\n ^\n 46: pkg_toml_config[\"tool\"] = our_toml_config[\"tool\"]\n 47: for tool, settings in pkg_toml_config[\"tool\"].items():\n 48: for setting, value in settings.items():\n"
31
- },
32
- {
33
- "description": "Cannot call overloaded function",
34
- "filename": "crackerjack/crackerjack.py",
35
- "absolute_filename": "/Users/les/Projects/crackerjack/crackerjack/crackerjack.py",
36
- "code": "incompatible_argument",
37
- "lineno": 46,
38
- "col_offset": 34,
39
- "context": " 43: if self.poetry_pip_env:\n 44: del pkg_toml_config[\"tool\"][\"poetry\"]\n 45: pkg_deps = pkg_toml_config[\"tool\"][\"pdm\"][\"dev-dependencies\"]\n 46: pkg_toml_config[\"tool\"] = our_toml_config[\"tool\"]\n ^\n 47: for tool, settings in pkg_toml_config[\"tool\"].items():\n 48: for setting, value in settings.items():\n 49: if isinstance(value, str | list) and \"crackerjack\" in value:\n",
40
- "message": "\nCannot call overloaded function (code: incompatible_argument)\n In overload (self, key: typing_extensions.SupportsIndex (Protocol with members '__index__'), /) -> int\n Incompatible argument type for key: expected typing_extensions.SupportsIndex (Protocol with members '__index__') but got Literal['tool']\n Literal['tool'] has no attribute '__index__'\n\n In overload (self, key: slice, /) -> bytes\n Incompatible argument type for key: expected slice but got Literal['tool']\n Cannot assign Literal['tool'] to slice\n\n\nIn crackerjack/crackerjack.py at line 46\n 43: if self.poetry_pip_env:\n 44: del pkg_toml_config[\"tool\"][\"poetry\"]\n 45: pkg_deps = pkg_toml_config[\"tool\"][\"pdm\"][\"dev-dependencies\"]\n 46: pkg_toml_config[\"tool\"] = our_toml_config[\"tool\"]\n ^\n 47: for tool, settings in pkg_toml_config[\"tool\"].items():\n 48: for setting, value in settings.items():\n 49: if isinstance(value, str | list) and \"crackerjack\" in value:\n"
41
- },
42
- {
43
- "description": "Cannot call overloaded function",
44
- "filename": "crackerjack/crackerjack.py",
45
- "absolute_filename": "/Users/les/Projects/crackerjack/crackerjack/crackerjack.py",
46
- "code": "incompatible_argument",
47
- "lineno": 47,
48
- "col_offset": 30,
49
- "context": " 44: del pkg_toml_config[\"tool\"][\"poetry\"]\n 45: pkg_deps = pkg_toml_config[\"tool\"][\"pdm\"][\"dev-dependencies\"]\n 46: pkg_toml_config[\"tool\"] = our_toml_config[\"tool\"]\n 47: for tool, settings in pkg_toml_config[\"tool\"].items():\n ^\n 48: for setting, value in settings.items():\n 49: if isinstance(value, str | list) and \"crackerjack\" in value:\n 50: if isinstance(value, str):\n",
50
- "message": "\nCannot call overloaded function (code: incompatible_argument)\n In overload (self, key: typing_extensions.SupportsIndex (Protocol with members '__index__'), /) -> int\n Incompatible argument type for key: expected typing_extensions.SupportsIndex (Protocol with members '__index__') but got Literal['tool']\n Literal['tool'] has no attribute '__index__'\n\n In overload (self, key: slice, /) -> bytes\n Incompatible argument type for key: expected slice but got Literal['tool']\n Cannot assign Literal['tool'] to slice\n\n\nIn crackerjack/crackerjack.py at line 47\n 44: del pkg_toml_config[\"tool\"][\"poetry\"]\n 45: pkg_deps = pkg_toml_config[\"tool\"][\"pdm\"][\"dev-dependencies\"]\n 46: pkg_toml_config[\"tool\"] = our_toml_config[\"tool\"]\n 47: for tool, settings in pkg_toml_config[\"tool\"].items():\n ^\n 48: for setting, value in settings.items():\n 49: if isinstance(value, str | list) and \"crackerjack\" in value:\n 50: if isinstance(value, str):\n"
51
- },
52
- {
53
- "description": "Cannot call overloaded function",
54
- "filename": "crackerjack/crackerjack.py",
55
- "absolute_filename": "/Users/les/Projects/crackerjack/crackerjack/crackerjack.py",
56
- "code": "incompatible_argument",
57
- "lineno": 56,
58
- "col_offset": 8,
59
- "context": " 53: value.remove(\"crackerjack\")\n 54: value.append(self.pkg_name)\n 55: settings[setting] = value\n 56: pkg_toml_config[\"tool\"][\"pdm\"][\"dev-dependencies\"] = pkg_deps\n ^\n 57: if self.pkg_path.stem == \"crackerjack\":\n 58: await dump.toml(pkg_toml_config, self.our_toml_path) # type: ignore\n 59: else:\n",
60
- "message": "\nCannot call overloaded function (code: incompatible_argument)\n In overload (self, key: typing_extensions.SupportsIndex (Protocol with members '__index__'), /) -> int\n Incompatible argument type for key: expected typing_extensions.SupportsIndex (Protocol with members '__index__') but got Literal['tool']\n Literal['tool'] has no attribute '__index__'\n\n In overload (self, key: slice, /) -> bytes\n Incompatible argument type for key: expected slice but got Literal['tool']\n Cannot assign Literal['tool'] to slice\n\n\nIn crackerjack/crackerjack.py at line 56\n 53: value.remove(\"crackerjack\")\n 54: value.append(self.pkg_name)\n 55: settings[setting] = value\n 56: pkg_toml_config[\"tool\"][\"pdm\"][\"dev-dependencies\"] = pkg_deps\n ^\n 57: if self.pkg_path.stem == \"crackerjack\":\n 58: await dump.toml(pkg_toml_config, self.our_toml_path) # type: ignore\n 59: else:\n"
61
- },
62
- {
63
- "description": "Incompatible argument type for obj: expected Union[str, os.PathLike (Protocol with members '__fspath__'), dict] but got Union[dict, bytes]",
64
- "filename": "crackerjack/crackerjack.py",
65
- "absolute_filename": "/Users/les/Projects/crackerjack/crackerjack/crackerjack.py",
66
- "code": "incompatible_argument",
67
- "lineno": 58,
68
- "col_offset": 28,
69
- "context": " 55: settings[setting] = value\n 56: pkg_toml_config[\"tool\"][\"pdm\"][\"dev-dependencies\"] = pkg_deps\n 57: if self.pkg_path.stem == \"crackerjack\":\n 58: await dump.toml(pkg_toml_config, self.our_toml_path) # type: ignore\n ^\n 59: else:\n 60: await dump.toml(pkg_toml_config, self.pkg_toml_path) # type: ignore\n 61: \n",
70
- "message": "\nIncompatible argument type for obj: expected Union[str, os.PathLike (Protocol with members '__fspath__'), dict] but got Union[dict, bytes] (code: incompatible_argument)\n Cannot assign to Union\n Cannot assign bytes to str\n bytes has no attribute '__fspath__'\n Cannot assign bytes to dict\n\nIn crackerjack/crackerjack.py at line 58\n 55: settings[setting] = value\n 56: pkg_toml_config[\"tool\"][\"pdm\"][\"dev-dependencies\"] = pkg_deps\n 57: if self.pkg_path.stem == \"crackerjack\":\n 58: await dump.toml(pkg_toml_config, self.our_toml_path) # type: ignore\n ^\n 59: else:\n 60: await dump.toml(pkg_toml_config, self.pkg_toml_path) # type: ignore\n 61: \n"
71
- },
72
- {
73
- "description": "Incompatible argument type for obj: expected Union[str, os.PathLike (Protocol with members '__fspath__'), dict] but got Union[dict, bytes]",
74
- "filename": "crackerjack/crackerjack.py",
75
- "absolute_filename": "/Users/les/Projects/crackerjack/crackerjack/crackerjack.py",
76
- "code": "incompatible_argument",
77
- "lineno": 60,
78
- "col_offset": 28,
79
- "context": " 57: if self.pkg_path.stem == \"crackerjack\":\n 58: await dump.toml(pkg_toml_config, self.our_toml_path) # type: ignore\n 59: else:\n 60: await dump.toml(pkg_toml_config, self.pkg_toml_path) # type: ignore\n ^\n 61: \n 62: async def clean_poetry_pipenv(self) -> None:\n 63: root_files = [\n",
80
- "message": "\nIncompatible argument type for obj: expected Union[str, os.PathLike (Protocol with members '__fspath__'), dict] but got Union[dict, bytes] (code: incompatible_argument)\n Cannot assign to Union\n Cannot assign bytes to str\n bytes has no attribute '__fspath__'\n Cannot assign bytes to dict\n\nIn crackerjack/crackerjack.py at line 60\n 57: if self.pkg_path.stem == \"crackerjack\":\n 58: await dump.toml(pkg_toml_config, self.our_toml_path) # type: ignore\n 59: else:\n 60: await dump.toml(pkg_toml_config, self.pkg_toml_path) # type: ignore\n ^\n 61: \n 62: async def clean_poetry_pipenv(self) -> None:\n 63: root_files = [\n"
81
- },
82
- {
83
- "description": "Variable tool is never accessed",
84
- "filename": "crackerjack/crackerjack.py",
85
- "absolute_filename": "/Users/les/Projects/crackerjack/crackerjack/crackerjack.py",
86
- "code": "unused_variable",
87
- "lineno": 47,
88
- "col_offset": 12,
89
- "context": " 44: del pkg_toml_config[\"tool\"][\"poetry\"]\n 45: pkg_deps = pkg_toml_config[\"tool\"][\"pdm\"][\"dev-dependencies\"]\n 46: pkg_toml_config[\"tool\"] = our_toml_config[\"tool\"]\n 47: for tool, settings in pkg_toml_config[\"tool\"].items():\n ^\n 48: for setting, value in settings.items():\n 49: if isinstance(value, str | list) and \"crackerjack\" in value:\n 50: if isinstance(value, str):\n",
90
- "message": "\nVariable tool is never accessed (code: unused_variable)\nIn crackerjack/crackerjack.py at line 47\n 44: del pkg_toml_config[\"tool\"][\"poetry\"]\n 45: pkg_deps = pkg_toml_config[\"tool\"][\"pdm\"][\"dev-dependencies\"]\n 46: pkg_toml_config[\"tool\"] = our_toml_config[\"tool\"]\n 47: for tool, settings in pkg_toml_config[\"tool\"].items():\n ^\n 48: for setting, value in settings.items():\n 49: if isinstance(value, str | list) and \"crackerjack\" in value:\n 50: if isinstance(value, str):\n"
91
- }
92
- ]
@@ -1,168 +0,0 @@
1
- 9 total failures in 1 files
2
-
3
-
4
- ### (9 failures)
5
-
6
- * line 44: `Cannot call overloaded function (code: incompatible_argument)`
7
- ```
8
- In overload (self, key: typing_extensions.SupportsIndex (Protocol with members '__index__'), /) -> int
9
- Incompatible argument type for key: expected typing_extensions.SupportsIndex (Protocol with members '__index__') but got Literal['tool']
10
- Literal['tool'] has no attribute '__index__'
11
-
12
- In overload (self, key: slice, /) -> bytes
13
- Incompatible argument type for key: expected slice but got Literal['tool']
14
- Cannot assign Literal['tool'] to slice
15
-
16
-
17
- In crackerjack/crackerjack.py at line 44
18
- 41: our_toml_config = await load.toml(self.our_toml_path) # type: ignore
19
- 42: pkg_toml_config = await load.toml(self.pkg_toml_path) # type: ignore
20
- 43: if self.poetry_pip_env:
21
- 44: del pkg_toml_config["tool"]["poetry"]
22
- ^
23
- 45: pkg_deps = pkg_toml_config["tool"]["pdm"]["dev-dependencies"]
24
- 46: pkg_toml_config["tool"] = our_toml_config["tool"]
25
- 47: for tool, settings in pkg_toml_config["tool"].items():
26
- ```
27
- * line 45: `Cannot call overloaded function (code: incompatible_argument)`
28
- ```
29
- In overload (self, key: typing_extensions.SupportsIndex (Protocol with members '__index__'), /) -> int
30
- Incompatible argument type for key: expected typing_extensions.SupportsIndex (Protocol with members '__index__') but got Literal['tool']
31
- Literal['tool'] has no attribute '__index__'
32
-
33
- In overload (self, key: slice, /) -> bytes
34
- Incompatible argument type for key: expected slice but got Literal['tool']
35
- Cannot assign Literal['tool'] to slice
36
-
37
-
38
- In crackerjack/crackerjack.py at line 45
39
- 42: pkg_toml_config = await load.toml(self.pkg_toml_path) # type: ignore
40
- 43: if self.poetry_pip_env:
41
- 44: del pkg_toml_config["tool"]["poetry"]
42
- 45: pkg_deps = pkg_toml_config["tool"]["pdm"]["dev-dependencies"]
43
- ^
44
- 46: pkg_toml_config["tool"] = our_toml_config["tool"]
45
- 47: for tool, settings in pkg_toml_config["tool"].items():
46
- 48: for setting, value in settings.items():
47
- ```
48
- * line 46: `Object of type bytes does not support '__setitem__' (code: unsupported_operation)`
49
- ```
50
- In crackerjack/crackerjack.py at line 46
51
- 43: if self.poetry_pip_env:
52
- 44: del pkg_toml_config["tool"]["poetry"]
53
- 45: pkg_deps = pkg_toml_config["tool"]["pdm"]["dev-dependencies"]
54
- 46: pkg_toml_config["tool"] = our_toml_config["tool"]
55
- ^
56
- 47: for tool, settings in pkg_toml_config["tool"].items():
57
- 48: for setting, value in settings.items():
58
- 49: if isinstance(value, str | list) and "crackerjack" in value:
59
- ```
60
- * line 46: `Cannot call overloaded function (code: incompatible_argument)`
61
- ```
62
- In overload (self, key: typing_extensions.SupportsIndex (Protocol with members '__index__'), /) -> int
63
- Incompatible argument type for key: expected typing_extensions.SupportsIndex (Protocol with members '__index__') but got Literal['tool']
64
- Literal['tool'] has no attribute '__index__'
65
-
66
- In overload (self, key: slice, /) -> bytes
67
- Incompatible argument type for key: expected slice but got Literal['tool']
68
- Cannot assign Literal['tool'] to slice
69
-
70
-
71
- In crackerjack/crackerjack.py at line 46
72
- 43: if self.poetry_pip_env:
73
- 44: del pkg_toml_config["tool"]["poetry"]
74
- 45: pkg_deps = pkg_toml_config["tool"]["pdm"]["dev-dependencies"]
75
- 46: pkg_toml_config["tool"] = our_toml_config["tool"]
76
- ^
77
- 47: for tool, settings in pkg_toml_config["tool"].items():
78
- 48: for setting, value in settings.items():
79
- 49: if isinstance(value, str | list) and "crackerjack" in value:
80
- ```
81
- * line 47: `Cannot call overloaded function (code: incompatible_argument)`
82
- ```
83
- In overload (self, key: typing_extensions.SupportsIndex (Protocol with members '__index__'), /) -> int
84
- Incompatible argument type for key: expected typing_extensions.SupportsIndex (Protocol with members '__index__') but got Literal['tool']
85
- Literal['tool'] has no attribute '__index__'
86
-
87
- In overload (self, key: slice, /) -> bytes
88
- Incompatible argument type for key: expected slice but got Literal['tool']
89
- Cannot assign Literal['tool'] to slice
90
-
91
-
92
- In crackerjack/crackerjack.py at line 47
93
- 44: del pkg_toml_config["tool"]["poetry"]
94
- 45: pkg_deps = pkg_toml_config["tool"]["pdm"]["dev-dependencies"]
95
- 46: pkg_toml_config["tool"] = our_toml_config["tool"]
96
- 47: for tool, settings in pkg_toml_config["tool"].items():
97
- ^
98
- 48: for setting, value in settings.items():
99
- 49: if isinstance(value, str | list) and "crackerjack" in value:
100
- 50: if isinstance(value, str):
101
- ```
102
- * line 47: `Variable tool is never accessed (code: unused_variable)`
103
- ```
104
- In crackerjack/crackerjack.py at line 47
105
- 44: del pkg_toml_config["tool"]["poetry"]
106
- 45: pkg_deps = pkg_toml_config["tool"]["pdm"]["dev-dependencies"]
107
- 46: pkg_toml_config["tool"] = our_toml_config["tool"]
108
- 47: for tool, settings in pkg_toml_config["tool"].items():
109
- ^
110
- 48: for setting, value in settings.items():
111
- 49: if isinstance(value, str | list) and "crackerjack" in value:
112
- 50: if isinstance(value, str):
113
- ```
114
- * line 56: `Cannot call overloaded function (code: incompatible_argument)`
115
- ```
116
- In overload (self, key: typing_extensions.SupportsIndex (Protocol with members '__index__'), /) -> int
117
- Incompatible argument type for key: expected typing_extensions.SupportsIndex (Protocol with members '__index__') but got Literal['tool']
118
- Literal['tool'] has no attribute '__index__'
119
-
120
- In overload (self, key: slice, /) -> bytes
121
- Incompatible argument type for key: expected slice but got Literal['tool']
122
- Cannot assign Literal['tool'] to slice
123
-
124
-
125
- In crackerjack/crackerjack.py at line 56
126
- 53: value.remove("crackerjack")
127
- 54: value.append(self.pkg_name)
128
- 55: settings[setting] = value
129
- 56: pkg_toml_config["tool"]["pdm"]["dev-dependencies"] = pkg_deps
130
- ^
131
- 57: if self.pkg_path.stem == "crackerjack":
132
- 58: await dump.toml(pkg_toml_config, self.our_toml_path) # type: ignore
133
- 59: else:
134
- ```
135
- * line 58: `Incompatible argument type for obj: expected Union[str, os.PathLike (Protocol with members '__fspath__'), dict] but got Union[dict, bytes] (code: incompatible_argument)`
136
- ```
137
- Cannot assign to Union
138
- Cannot assign bytes to str
139
- bytes has no attribute '__fspath__'
140
- Cannot assign bytes to dict
141
-
142
- In crackerjack/crackerjack.py at line 58
143
- 55: settings[setting] = value
144
- 56: pkg_toml_config["tool"]["pdm"]["dev-dependencies"] = pkg_deps
145
- 57: if self.pkg_path.stem == "crackerjack":
146
- 58: await dump.toml(pkg_toml_config, self.our_toml_path) # type: ignore
147
- ^
148
- 59: else:
149
- 60: await dump.toml(pkg_toml_config, self.pkg_toml_path) # type: ignore
150
- 61:
151
- ```
152
- * line 60: `Incompatible argument type for obj: expected Union[str, os.PathLike (Protocol with members '__fspath__'), dict] but got Union[dict, bytes] (code: incompatible_argument)`
153
- ```
154
- Cannot assign to Union
155
- Cannot assign bytes to str
156
- bytes has no attribute '__fspath__'
157
- Cannot assign bytes to dict
158
-
159
- In crackerjack/crackerjack.py at line 60
160
- 57: if self.pkg_path.stem == "crackerjack":
161
- 58: await dump.toml(pkg_toml_config, self.our_toml_path) # type: ignore
162
- 59: else:
163
- 60: await dump.toml(pkg_toml_config, self.pkg_toml_path) # type: ignore
164
- ^
165
- 61:
166
- 62: async def clean_poetry_pipenv(self) -> None:
167
- 63: root_files = [
168
- ```
@@ -1,16 +0,0 @@
1
- crackerjack-0.3.3.dist-info/METADATA,sha256=0qkbkPZo7XG-ZcJRI2ZUscs30f_SMkaaXYzM_nQhR2A,6909
2
- crackerjack-0.3.3.dist-info/WHEEL,sha256=2pzpU5yX8ZDRkL1JJPwjqHXoJgM2dqtofaxvD6IHFj4,90
3
- crackerjack-0.3.3.dist-info/licenses/LICENSE,sha256=fDt371P6_6sCu7RyqiZH_AhT1LdN3sN1zjBtqEhDYCk,1531
4
- crackerjack/.crackerjack-config.yaml,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- crackerjack/.gitignore,sha256=zwjmMMYlvFJk2zODY-u6UbPn6sf6O1HJZfMQpYWB7FE,223
6
- crackerjack/.libcst.codemod.yaml,sha256=TLE_I07llPTYk_tm36z-hN15O3X27qztNdJ3Ev9ODMk,768
7
- crackerjack/.pre-commit-config.yaml,sha256=sTSvNO3tCNUV3b0KtvB2ANB_en32hkd0-iG-ELwNQUY,2913
8
- crackerjack/.pyanalyze-report.json,sha256=TtX58tIzhzhky5QQUr2ps_6eh8qJ2ILkoiSS0km-6XI,15547
9
- crackerjack/.pyanalyze-report.md,sha256=w8_qufplVZ_bO5m76z5esSDIZv6EZIAUV4-LW7hTAp8,8180
10
- crackerjack/.ruff_cache/.gitignore,sha256=aEiIwOuxfzdCmLZe4oB1JsBmCUxwG8x-u-HBCV9JT8E,1
11
- crackerjack/.ruff_cache/CACHEDIR.TAG,sha256=WVMVbX4MVkpCclExbq8m-IcOZIOuIZf5FrYw5Pk-Ma4,43
12
- crackerjack/__init__.py,sha256=AuglbbJHkUJ2GdvyT0ca35ntexo1RkT2V6DgypoFeEk,121
13
- crackerjack/__main__.py,sha256=XU07It42ZWkn_FZ88pFIBA6FQWJFqQADTcs75n435SA,1413
14
- crackerjack/crackerjack.py,sha256=UD_tQ2AoFCTOvXtV1JVFN6lqVjFdualv1y6VLQdpifo,6093
15
- crackerjack/pyproject.toml,sha256=Gtp5r3QMEN3k1PSX2Tos8ldBPHc9YBNoqZYaNyZ0OJg,1658
16
- crackerjack-0.3.3.dist-info/RECORD,,