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

[pre-commit.ci] pre-commit autoupdate #8773

Merged
merged 8 commits into from
Mar 18, 2024
Merged

Conversation

@scottbarnes
Copy link
Collaborator

scottbarnes commented Feb 20, 2024

I will need someone else to review the changes I made to get this PR to pass all the tests.

Also, as a note to myself, my changes to this branch disappear every time pre-commit-ci pushes more changes, so I need to rebase off the branch and re-push every time that happens.

Copy link
Member

@mekarpeles mekarpeles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, pinging @hornc in case any of the marc code is still being used

@pre-commit-ci pre-commit-ci bot force-pushed the pre-commit-ci-update-config branch 2 times, most recently from fd07bd6 to eb92915 Compare March 18, 2024 21:40
pre-commit-ci bot and others added 7 commits March 18, 2024 15:28
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.14 → v0.2.2](astral-sh/ruff-pre-commit@v0.1.14...v0.2.2)
- [github.com/psf/black: 23.12.1 → 24.2.0](psf/black@23.12.1...24.2.0)
- [github.com/abravalheri/validate-pyproject: v0.15 → v0.16](abravalheri/validate-pyproject@v0.15...v0.16)
- [github.com/pre-commit/mirrors-eslint: v9.0.0-alpha.1 → v9.0.0-beta.0](pre-commit/mirrors-eslint@v9.0.0-alpha.1...v9.0.0-beta.0)
This code for stripping a trailing `.` after three digits is unused.

The line before the removed code calls:
`pick_first_date()` -> `parse_date()` -> `remove_trailing_number_dot()`,
which calls a regex that will match anything the removed one does.

Removed regex:            `re_number_dot = re.compile(r'\d{3,}\.$')`
Regex that already runs`: `re_number_dot = re.compile(r'\d{2,}[- ]*(\.+)$')`
@scottbarnes scottbarnes merged commit 3d1b5ae into master Mar 18, 2024
3 checks passed
rebecca-shoptaw pushed a commit to rebecca-shoptaw/openlibrary that referenced this pull request Mar 19, 2024
* marc/parse.py: remove unused code

This code for stripping a trailing `.` after three digits is unused.

* Remove unnecessary key check before dictionary access

* Avoid quadratic list summation

* Use `dict.get('blah')`  instead of `dict.get('blah', None)`

* Add a test with four digits followed by a period

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------
Co-authored-by: Scott Barnes <scottreidbarnes@gmail.com>
rebecca-shoptaw pushed a commit to rebecca-shoptaw/openlibrary that referenced this pull request Mar 19, 2024
* marc/parse.py: remove unused code

This code for stripping a trailing `.` after three digits is unused.

* Remove unnecessary key check before dictionary access

* Avoid quadratic list summation

* Use `dict.get('blah')`  instead of `dict.get('blah', None)`

* Add a test with four digits followed by a period

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------
Co-authored-by: Scott Barnes <scottreidbarnes@gmail.com>
merwhite11 pushed a commit to merwhite11/openlibrary that referenced this pull request Mar 27, 2024
* marc/parse.py: remove unused code

This code for stripping a trailing `.` after three digits is unused.

* Remove unnecessary key check before dictionary access

* Avoid quadratic list summation

* Use `dict.get('blah')`  instead of `dict.get('blah', None)`

* Add a test with four digits followed by a period

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------
Co-authored-by: Scott Barnes <scottreidbarnes@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants