Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: modernisation of proselint #1371

Draft
wants to merge 434 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
434 commits
Select commit Hold shift + click to select a range
77f4a50
reformat
orgua Jan 18, 2024
0a3bbab
refine examples
orgua Jan 18, 2024
2ddfadf
Update test_checks.py
orgua Jan 18, 2024
af2f63e
Update test_checks.py
orgua Jan 18, 2024
3135d93
doc
orgua Jan 19, 2024
ee31347
improve lexical illusions
orgua Jan 19, 2024
3bac410
precompile preferred forms
orgua Jan 19, 2024
e3a593d
Update but.py
orgua Jan 19, 2024
215a728
major speedup for regex
orgua Jan 20, 2024
39835f0
reformat
orgua Jan 20, 2024
6ceaf6a
Update but.py
orgua Jan 20, 2024
06b97f6
optimize new regex-speedup
orgua Jan 20, 2024
d5d3e6f
speedup scientific-checks
orgua Jan 20, 2024
7fe0d86
optimize symbols
orgua Jan 20, 2024
d95585e
optimize capitalization-checks
orgua Jan 20, 2024
8fb3367
reformat
orgua Jan 20, 2024
e0e492f
fix multiple unittests
orgua Jan 20, 2024
4a3e91a
rework some regex
orgua Jan 20, 2024
b6e4fb0
update ruff
orgua Jan 20, 2024
89c23e3
fix various regex, less false positive
orgua Jan 21, 2024
7548c80
Merge branch 'main' into main
Nytelife26 Jan 22, 2024
361235a
reduce false positives in checks.numbers
orgua Jan 22, 2024
ed3bdbc
changes proposed in PR-comments
orgua Jan 22, 2024
13d11ad
changes proposed in PR-comments part2
orgua Jan 22, 2024
3fbaaef
ci(lint-test): fix pytest
Nytelife26 Jan 24, 2024
d3213d6
fix file endings and remove not needed spaces
orgua Dec 27, 2023
6eb6949
raise min py-version to 3.8 and remove future
orgua Dec 27, 2023
a04b80b
update deps
orgua Dec 27, 2023
b552b74
py: add commas
orgua Dec 27, 2023
691a145
clean imports
orgua Dec 27, 2023
4c155b1
lint code
orgua Dec 27, 2023
1434a98
fix programming error
orgua Dec 27, 2023
912e965
chore(deps): bump actions/cache from 2 to 3
dependabot[bot] Dec 27, 2023
f14ce3a
chore(deps): bump actions/setup-python from 4 to 5
dependabot[bot] Dec 27, 2023
6d6d995
chore(deps-dev): bump pytest from 6.2.5 to 7.4.3
dependabot[bot] Dec 27, 2023
a0f8bc7
chore(deps): bump actions/checkout from 2 to 4
dependabot[bot] Dec 27, 2023
eefe9f1
chore(deps): bump ruby/setup-ruby from 1.95.0 to 1.163.0
dependabot[bot] Dec 27, 2023
03b91ab
do not pin package-versions if not needed
orgua Dec 27, 2023
75cd2b7
clean up usage of paths
orgua Dec 27, 2023
41ac3bd
remove legacy-code
orgua Dec 27, 2023
a0e43e8
avoid shadowing a Python builtins
orgua Dec 27, 2023
4b1e5c7
sort imports
orgua Dec 28, 2023
3988867
add typehinting
orgua Dec 28, 2023
18d22c0
format with black-style, ruff
orgua Dec 31, 2023
c4fdcfa
add proper logging capability
orgua Dec 31, 2023
391bafb
refactor internal paths
orgua Dec 31, 2023
938f157
refactor cache
orgua Dec 31, 2023
31cc235
lint
orgua Dec 31, 2023
ce94896
refactor cache
orgua Dec 31, 2023
2e74b61
add chromalog and update deps
orgua Dec 31, 2023
fa9f6cd
refactor logger
orgua Dec 31, 2023
a07fa34
various refactoring
orgua Dec 31, 2023
12bd14a
allow benchmarking & fix bugs
orgua Dec 31, 2023
d97811a
small bugfixes
orgua Jan 1, 2024
7e62d8b
replace memoiziation, improve code around it
orgua Jan 1, 2024
d41ca24
consider age of cache-entries
orgua Jan 1, 2024
3b51220
optimize slowest funcs
orgua Jan 1, 2024
fcc7d29
remove tests for compiled-file-deletion
orgua Jan 1, 2024
f0dc9cf
refactor for modularity
orgua Jan 1, 2024
b58f140
last transformations to list comprehensions
orgua Jan 1, 2024
6cffecf
refactor unittests (wip)
orgua Jan 2, 2024
457c832
remove duplicates
orgua Jan 2, 2024
3da41d8
reformat
orgua Jan 2, 2024
74a726c
Update config_default.py
orgua Jan 2, 2024
58b7a42
refactor unittests
orgua Jan 2, 2024
b32d853
move tests for checks in separate folder
orgua Jan 2, 2024
c1bfeea
allow disabling cache
orgua Jan 2, 2024
b8e7048
small renaming & formatting
orgua Jan 2, 2024
870671e
extending sys.path not needed
orgua Jan 2, 2024
fc8a356
propagate module-path
orgua Jan 2, 2024
7bb9d3e
refactor web-scripts
orgua Jan 2, 2024
f7fa09f
refactor new scripts
orgua Jan 2, 2024
4e4a596
refactor and reformat scripts
orgua Jan 2, 2024
9e0307e
add cache-tests
orgua Jan 2, 2024
54631fb
add config-tests
orgua Jan 2, 2024
cb23bb9
add note to benchmark
orgua Jan 2, 2024
05871d9
add printer for invoke()
orgua Jan 2, 2024
ffecc43
revert renaming txt-file for tests
orgua Jan 2, 2024
53dc973
update configs in sync to available tests
orgua Jan 2, 2024
5828288
fix tests
orgua Jan 2, 2024
14beecb
catch missing modules, make ppm-wrapper nicer
orgua Jan 2, 2024
f53c55e
add exithandler and return number of results as exit-code
orgua Jan 2, 2024
a13cc04
Update test_cache_function.py
orgua Jan 2, 2024
c1db241
Update test_config_default.py
orgua Jan 2, 2024
ac334fa
workflows make version to string
orgua Jan 2, 2024
f81bf0b
sort dev-deps, also include pre-commit and remove packages covered by…
orgua Jan 2, 2024
dd86494
Update ci-lint-test.yml
orgua Jan 2, 2024
0e7d620
chore(deps): bump crazy-max/ghaction-github-labeler from 3 to 5
dependabot[bot] Jan 1, 2024
1829d4b
chore(deps): bump ruby/setup-ruby from 1.163.0 to 1.165.1
dependabot[bot] Jan 1, 2024
66ab691
add multiprocessing for checks
orgua Jan 3, 2024
e7d70b2
ditch chromalog-package
orgua Jan 3, 2024
7ef4d60
parallelize lint()
orgua Jan 3, 2024
fd96434
remove memoizer for checks
orgua Jan 3, 2024
1ae3926
extend benchmark scripts
orgua Jan 3, 2024
9d677fe
extend cache to handle const-properties
orgua Jan 3, 2024
cf6384f
refactor sexism-check and extend unittests
orgua Jan 3, 2024
25e1a9d
minor fixes
orgua Jan 3, 2024
98a7980
refactor more checks and tests
orgua Jan 3, 2024
cae7728
fix check_option join & require_padding
orgua Jan 3, 2024
22bf2fc
even out load of checks for extreme cases
orgua Jan 4, 2024
5eab18c
add pytest-cov dependency
orgua Jan 4, 2024
f323c5d
fix check-tests
orgua Jan 4, 2024
1768bb5
fix test for caching
orgua Jan 4, 2024
78a703f
remove const-cache after benchmarking
orgua Jan 4, 2024
c177a65
refactor all multiprocessed code into submodule
orgua Jan 4, 2024
d9cdfd3
clean up from latest debug session
orgua Jan 4, 2024
521b076
change config
orgua Jan 4, 2024
a302e4c
fix unittests
orgua Jan 4, 2024
aaba845
linting
orgua Jan 4, 2024
e3b7b02
cache is now a singleton
orgua Jan 4, 2024
998d0f5
Update tools.py
orgua Jan 4, 2024
6744baf
Update test_hyperlinks_on_shell.py
orgua Jan 4, 2024
e4535c1
add padding to text - guard against edge-cases
orgua Jan 4, 2024
b03c870
rename lint_cache
orgua Jan 4, 2024
23a54f4
force single-line imports
orgua Jan 4, 2024
e294602
add global executor and optimize memoizer
orgua Jan 4, 2024
c4ecb77
optimize check-message
orgua Jan 4, 2024
4c1016e
lint code
orgua Jan 4, 2024
5e2ea1b
add current ruff-config
orgua Jan 4, 2024
3c44e3b
overhaul output-format system
orgua Jan 5, 2024
0a32450
store filename in error-list
orgua Jan 5, 2024
771788d
fix bug in memoizer
orgua Jan 5, 2024
f53a531
improve memoizer
orgua Jan 5, 2024
d7d78f6
fix padding in some checks
orgua Jan 5, 2024
529efbe
improve commercialese
orgua Jan 5, 2024
5ef1d75
improve memoizer
orgua Jan 5, 2024
52da9f3
Update score.py
orgua Jan 5, 2024
94956d5
add weasel words
orgua Jan 5, 2024
7b1a232
fix unittests
orgua Jan 5, 2024
a2c2d48
speed up scripts
orgua Jan 5, 2024
d4bf985
move printing out of linter
orgua Jan 5, 2024
a8af783
Added clichés from Nigel Rees' book
mdgjohnny Sep 10, 2023
185c344
Tests for Nigel's clichés
orgua Jan 5, 2024
c1d67df
added check for punctuation spacing. Issue #1342
arostkowycz15 Apr 17, 2023
a60cc86
fix unittests and lint
orgua Jan 5, 2024
84a40ab
bump version
orgua Jan 14, 2024
b3ebed3
ci(lint-test): fix pytest
Nytelife26 Jan 24, 2024
90d610f
chore: fix merge differences
Nytelife26 Jan 25, 2024
2104094
chore: resolve rebase issues
Nytelife26 Jan 25, 2024
64bb526
chore(deps): add ruff
Nytelife26 Jan 25, 2024
fc5e10a
lint: fix ruff suggestions
Nytelife26 Jan 25, 2024
30f1972
ci(lint-test): lint with ruff
Nytelife26 Jan 25, 2024
cefb7a3
chore: fix lint issues
Nytelife26 Jan 25, 2024
c1cc4db
Merge branch 'main' of https://github.com/orgua/proselint-modernized
orgua Jan 25, 2024
ee7dbf4
Update tests/check.py
orgua Jan 25, 2024
fa9b0cd
implement comments
orgua Jan 25, 2024
eb414d1
Merge branch 'main' of https://github.com/orgua/proselint-modernized
orgua Jan 25, 2024
74581f5
Merge branch 'main' into dev
orgua Jan 25, 2024
6828d25
fix regression from latest merge
orgua Jan 26, 2024
13406bc
fix regressions
orgua Jan 26, 2024
5b7c384
reformat files
orgua Jan 26, 2024
c878fc6
first test for speeding up preferred_forms_check
orgua Jan 26, 2024
271f677
replace candidates with faster preferred_check()
orgua Jan 26, 2024
43f0a26
Update pyproject.toml
orgua Jan 26, 2024
8588e5f
Update test_regex_in_checks.py
orgua Jan 26, 2024
6c4a9c4
optimize pre-check
orgua Jan 26, 2024
79214cc
replace resultCheck with namedtuple
orgua Jan 27, 2024
2d80987
optimize check: waxed and venery
orgua Jan 27, 2024
5416db0
rename simple_check()
orgua Jan 27, 2024
36d6c8f
Update pyproject.toml
orgua Jan 27, 2024
bba60a7
fix unittest falling for new template check
orgua Jan 27, 2024
bc98664
add regex-testing and fix checks
orgua Jan 27, 2024
72360a6
big speed-improvement for large texts
orgua Jan 28, 2024
833d683
disable checks in preview phase
orgua Jan 28, 2024
30d0ebd
restore old compact output
orgua Jan 28, 2024
6ecf7ae
chore: update lockfile
Nytelife26 Apr 23, 2024
2f7017b
chore: implement review suggestions
Nytelife26 Apr 23, 2024
e0d1f45
style: general linting & documentation changes
Nytelife26 Apr 24, 2024
74c3323
fix: correct crash when linting from stdin
Nytelife26 Apr 24, 2024
106e42d
fix: correct crash when error occurs at position 0
Nytelife26 Apr 24, 2024
91bc0ac
style: apply lint
Nytelife26 May 14, 2024
1b84c4d
efactor(cli): custom parsing implementation
Nytelife26 May 23, 2024
a0631ae
chore: merge main -> dev
Nytelife26 May 27, 2024
39b1662
test: add tests for reverse_existence_check
Nytelife26 May 28, 2024
75837bd
chore: update dependencies and lock file
Nytelife26 May 28, 2024
8f11022
test: update tests for cli refactor
Nytelife26 May 28, 2024
a617671
ci: remove danger
Nytelife26 May 28, 2024
b6b1eca
refactor(checks): improve performance of check collection
Nytelife26 May 28, 2024
8a6d8de
refactor: add provisional registry system
Nytelife26 Jul 9, 2024
6d3aaf8
ci: use registry for benchmarks
Nytelife26 Jul 9, 2024
c0a456d
refactor: add partial key detection to the registry
Nytelife26 Jul 9, 2024
524033a
feat: add check specifications
Nytelife26 Jul 16, 2024
5d81d3d
refactor: readd limit_results and ppm_threshold as CheckFlags
Nytelife26 Jul 16, 2024
fca1779
refactor: fix scripts
Nytelife26 Jul 16, 2024
97f28e8
refactor: register_with -> static __register__ export
Nytelife26 Jul 17, 2024
adb383f
refactor: flatten checks that only contain a misc module
Nytelife26 Jul 17, 2024
bc1a7c2
refactor: remove cursing.filth, cursing.nfl, links & security
Nytelife26 Jul 17, 2024
3cadd03
refactor: create industrial_language category
Nytelife26 Jul 17, 2024
ff5825e
fix: replicate industrial_language changes to config_base
Nytelife26 Jul 17, 2024
6a0d6da
fix: switch message formatting in industrial_laanguage.commercialese.…
Nytelife26 Jul 17, 2024
f6b9943
test: update test_checks to use dispatch system
Nytelife26 Jul 17, 2024
afcee7c
test: update test_regex_in_checks to use dispatch system
Nytelife26 Jul 17, 2024
28fedfb
test: remove incorrect pass entry from sexism.misc
Nytelife26 Jul 19, 2024
2fb3f85
chore: fix whitespace in test-proselintrc.json
Nytelife26 Jul 19, 2024
9ee7a2f
style: apply lint
Nytelife26 Jul 19, 2024
1ec38de
refactor: recategorise punctuation, typography and hyperbole checks
Nytelife26 Jul 19, 2024
c96b990
fix: correct issue in dates_times index registry
Nytelife26 Jul 19, 2024
5b6e78a
refactor: tidy up check category indexes
Nytelife26 Jul 19, 2024
d621527
refactor: move lgbtq.offensive_terms to lgbtq.terms.offensive
Nytelife26 Jul 19, 2024
1d9d3af
refactor: move lgbtq, cursing, sexism into social_awareness
Nytelife26 Jul 19, 2024
a36c97c
refactor: add context carrier to custom check functions
Nytelife26 Jul 20, 2024
b6e6b5c
ci: unpin windows and ubuntu versions for testing
Nytelife26 Jul 20, 2024
6c9fefe
refactor: remove topic system
Nytelife26 Jul 20, 2024
dc5e91f
refactor: rename string -> unicode in existence_check for consistency
Nytelife26 Jul 20, 2024
d4f2ee4
refactor: tidy up find_quoted_ranges
Nytelife26 Jul 20, 2024
bb766a6
refactor: add find_spans
Nytelife26 Jul 20, 2024
f495786
fix: do not throw error for valid condition of matches_partial
Nytelife26 Jul 21, 2024
532d28a
refactor: split typography.symbols.apostrophes into separate specs
Nytelife26 Jul 21, 2024
9b02b1c
fix: add ignore_case to punctuation.misc.lower_case
Nytelife26 Jul 21, 2024
4c773e1
refactor: skip .value in padding formatting
Nytelife26 Jul 21, 2024
2f52ed5
refactor: merge psychology into scientific
Nytelife26 Jul 21, 2024
910b998
chore: update config_base with latest changes
Nytelife26 Jul 21, 2024
25e7b92
feat: add provisional implementation of granular selection
Nytelife26 Jul 21, 2024
529e03a
fix: update config_base
Nytelife26 Jul 21, 2024
d7ff4f9
refactor: remove debug timing for registry
Nytelife26 Jul 22, 2024
cfcfbc2
style: remove unnecessary exception alias in registry discovery
Nytelife26 Jul 22, 2024
37e1ba9
refactor: replace filter with comprehension in registry get_all_enabled
Nytelife26 Jul 22, 2024
41e646a
test: clean up test_checks and test_regex_in_checks
Nytelife26 Jul 22, 2024
0432cb6
fix: normalize check paths
Nytelife26 Jul 22, 2024
be0812d
test: use dispatch_with_flags to prevent false false positives
Nytelife26 Jul 22, 2024
46e5fcb
fix: enable ignore_case for misc.capitalization.roman_num.ww
Nytelife26 Jul 22, 2024
f76b572
fix: prevent check discovery from occurring more than once
Nytelife26 Jul 22, 2024
56b784f
refactor: use cachetools.TTLCache for memoizer
Nytelife26 Jul 22, 2024
244ddf8
test: update test_cache_function
Nytelife26 Jul 22, 2024
1884de7
style: implement boolean trap and naming rules
Nytelife26 Jul 22, 2024
98bd5ab
refactor: implement boolean switch lints
Nytelife26 Jul 23, 2024
cd2fbdc
ci: lint source and tests on changed files exclusively
Nytelife26 Jul 23, 2024
5d26b06
refactor: use TypedDict for config
Nytelife26 Jul 23, 2024
639e02c
fix: correct exports for industrial_language and misc.numbers
Nytelife26 Jul 23, 2024
37c9aef
test: add base tests for registry system
Nytelife26 Jul 23, 2024
0fd9427
feat: use OSC 8 hyperlinks for filenames in output
Nytelife26 Jul 23, 2024
0ff03ec
ci: switch to pdm
Nytelife26 Jul 24, 2024
9eff45b
ci: fix pdm and ruff inputs
Nytelife26 Jul 24, 2024
c4208ca
chore: update lockfile
Nytelife26 Jul 24, 2024
c1d9db4
chore: add pdm scripts for dx
Nytelife26 Jul 24, 2024
2625c60
fix: remove no longer existing entries from default config
Nytelife26 Jul 24, 2024
18459e5
refactor: raise minimum version from python 3.8 -> python 3.9
Nytelife26 Jul 24, 2024
df4cf08
feat: add rich logging under provisional --fancy argument
Nytelife26 Jul 25, 2024
a032af4
revert: delete accidental inclusion of proselint/test.py
Nytelife26 Jul 25, 2024
6adbefd
chore: upload beginning of proselint-rs
Nytelife26 Nov 7, 2024
8e37580
chore: apply fmt
Nytelife26 Nov 7, 2024
81d89d1
revert: delete accidental inclusion of debug message
Nytelife26 Nov 7, 2024
3e0589f
feat: make CheckFn Send and Sync for parallelization
Nytelife26 Nov 28, 2024
34e822e
refactor: replace fancy_regex -> regex wherever possible
Nytelife26 Jan 14, 2025
30d4a85
refactor: use homogenous typing for offsets and pairs
Nytelife26 Jan 14, 2025
76ce36e
refactor: remove unused unicode and dotall options
Nytelife26 Jan 14, 2025
74e1798
refactor: change type of check_name from String to &str
Nytelife26 Jan 17, 2025
f76696d
refactor: give check functions consistent signatures
Nytelife26 Jan 17, 2025
a390bbd
refactor: use native dynamic dispatch
Nytelife26 Jan 19, 2025
16b51e1
fix(main): add missing argument to call in run_check
Nytelife26 Jan 19, 2025
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
Prev Previous commit
Next Next commit
revert: delete accidental inclusion of proselint/test.py
  • Loading branch information
Nytelife26 committed Jul 25, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit a032af4e3ab6712a06d58e9934ed72573e0cb1cc
17 changes: 0 additions & 17 deletions proselint/test.py

This file was deleted.

Loading