Skip to content

Commit 769a0b3

Browse files
committed
repo files
1 parent 2175d1e commit 769a0b3

9 files changed

Lines changed: 275 additions & 173 deletions

File tree

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ end_of_line = lf
2020
indent_size = 2
2121
indent_style = space
2222
insert_final_newline = true
23-
max_line_length = 101
23+
max_line_length = 102
2424
spelling_language = en-US
2525
tab_width = 2
2626
trim_trailing_whitespace = true

.github/HH-docstrings.md

Lines changed: 208 additions & 155 deletions
Large diffs are not rendered by default.

.github/HH-formatting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Structure code so that readers encounter syntactic signals before the elements t
1919
### Line Length
2020

2121
- Prefer keeping function and method signatures on a single line when possible.
22-
- If a signature must wrap, apply semantic line breaking (see below), not arbitrary character-count breaking.
22+
- If a signature must span multiple lines, apply semantic line breaking (see below), not arbitrary character-count breaking.
2323
- Do not use automated formatters (Black, yapf, autopep8) unless the repository already uses them consistently.
2424

2525
### Line Continuation

.github/HH-status-messages.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ message: str = f"I received `{dimensionLength = }`, but I need a value greater t
4949
message: str = f"I received '{computationDivisionsAsString}' for `computationDivisions`, but this value is not supported."
5050
```
5151

52-
Wrap identifiers in backticks within the message string for visual distinction.
52+
Enclose identifiers in backticks within the message string for visual distinction.
5353

5454
## Message Content Principles
5555

@@ -151,6 +151,6 @@ Never use ANSI codes in exception messages or log entries—only for direct term
151151

152152
### Backtick Usage
153153

154-
- Wrap all identifiers in backticks: `` `parameterName` ``, `` `ValueError` ``
155-
- Wrap Python keywords in backticks: `` `None` ``, `` `True` ``
154+
- Enclose all identifiers in backticks: `` `parameterName` ``, `` `ValueError` ``
155+
- Enclose Python keywords in backticks: `` `None` ``, `` `True` ``
156156
- Use backticks for code elements referenced in prose

.github/HH-type-annotations.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
Standards for Python type annotations emphasizing precision, completeness, modern syntax (PEP 585/604), and paradigm improvements (TypedDict, Protocol, TypeVar, overload).
44

5+
## DO NOT CHANGE THE LOGIC OR FORMATTING OR DOCSTRINGS OR IDENTIFIERS
6+
7+
Your job is type annotations. Full stop.
8+
59
## Core Philosophy
610

711
Type annotations are engineering tools that prevent bugs, communicate intent to human readers, and enable editor/tooling assistance. Every annotation must carry practical value. Completeness matters: annotate everything precisely—every function signature (all parameters and return types), every variable binding, every class attribute.

.github/workflows/githubRelease.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ jobs:
3535
except urllib.error.HTTPError as thisIsAStupidSystem:
3636
if thisIsAStupidSystem.code != 404:
3737
raise
38-
urllib.request.urlopen(urllib.request.Request(url,json.dumps({'tag_name': tag, 'name': tag}).encode(),headers, method='POST'))
38+
urllib.request.urlopen(urllib.request.Request(url,json.dumps({'tag_name': tag, 'name': tag}).encode(),headers, method='POST'))
3939
"

.isort.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
[settings]
2+
add_imports = from __future__ import annotations
23
combine_as_imports = true
4+
extend_skip_glob =*.ipynb
5+
filter_files = true
36
force_alphabetical_sort_within_sections = true
47
from_first = true
58
honor_noqa = true

pyrightconfig.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{
2+
"deprecateTypingAliases": true,
3+
"disableBytesTypePromotions": true,
4+
"enableReachabilityAnalysis": true,
5+
"enableTypeIgnoreComments": false,
26
"reportConstantRedefinition": false,
37
"reportInvalidTypeVarUse": false,
48
"reportPrivateUsage": false,
@@ -9,12 +13,8 @@
913
"reportUnusedFunction": "information",
1014
"reportUnusedImport": "information",
1115
"reportUnusedVariable": "information",
12-
"typeCheckingMode": "strict",
13-
"deprecateTypingAliases": true,
14-
"disableBytesTypePromotions": true,
15-
"enableReachabilityAnalysis": true,
16-
"enableTypeIgnoreComments": false,
1716
"strictDictionaryInference": true,
1817
"strictListInference": true,
1918
"strictSetInference": true,
19+
"typeCheckingMode": "strict",
2020
}

ruff.toml

Lines changed: 49 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
11
extend = "pyproject.toml"
22

3+
line-length = 140
4+
35
[lint]
6+
preview = true
7+
allowed-confusables = [
8+
"",
9+
"×",
10+
"",
11+
"",
12+
"",
13+
"",
14+
"",
15+
"",
16+
"",
17+
"",
18+
"α",
19+
"γ",
20+
"ρ",
21+
"σ",
22+
]
423
ignore = [
524
"ANN401",
625
"C901",
@@ -13,7 +32,7 @@ ignore = [
1332
"F401",
1433
"FIX",
1534
"FLY002",
16-
"I001",
35+
"I",
1736
"N",
1837
"PGH004",
1938
"PLC0105",
@@ -38,20 +57,40 @@ ignore = [
3857
"S603",
3958
"SIM108",
4059
"SIM300",
41-
"TC001",
42-
"TC002",
43-
"TC003",
44-
"TC006",
4560
"TD",
4661
"W191",
4762
"W292",
63+
# preview rules
64+
"CPY001",
65+
"D420",
66+
"DOC102",
67+
"E265",
68+
"E302",
69+
"E303",
70+
"E305",
71+
"PLR0914",
72+
"PLR0917",
73+
"S403",
4874
]
4975
select = ["ALL"]
5076
task-tags = ["DEVELOPMENT", "NOTE", "SEMIOTICS", "TODO"]
5177

5278
[lint.flake8-import-conventions]
53-
aliases = { numpy = "numpy", pandas = "pandas", "re" = "regex" }
54-
banned-aliases = { numpy = ["np"], pandas = ["pd"], regex=["re"] }
79+
banned-aliases = { numpy = ["np"], pandas = ["pd"], regex = ["re"] }
80+
81+
[lint.flake8-import-conventions.aliases]
82+
"accelerate.utils.dataclasses" = "accelerate_dataclasses"
83+
"fs.path" = "fs_path"
84+
"itertools.product" = "CartesianProduct"
85+
"torch.autograd.grad" = "torch_grad"
86+
"torch.nn.functional" = "F"
87+
"torch.nn.parallel.DistributedDataParallel" = "DDP"
88+
numpy = "numpy"
89+
pandas = "pandas"
90+
re = "regex"
91+
92+
[lint.flake8-quotes]
93+
inline-quotes = "single"
5594

5695
[lint.per-file-ignores]
5796
"__init__.py" = ["PLC0414"]
@@ -70,4 +109,7 @@ banned-aliases = { numpy = ["np"], pandas = ["pd"], regex=["re"] }
70109
convention = "numpy"
71110

72111
[format]
112+
docstring-code-format = true
113+
quote-style = "single"
73114
indent-style = "tab"
115+
skip-magic-trailing-comma = true

0 commit comments

Comments
 (0)