-
Notifications
You must be signed in to change notification settings - Fork 1
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
Config lefthook #25
Merged
Merged
Config lefthook #25
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
db0fc0d
improve tes models
775e72f
update lint config and fix lint issue
4c82117
block push if lint fails
9724ccf
block push if lint fails
f64ba49
configure lefthook
db07662
configure lefthook
0b4b94b
Revert "configure lefthook"
17cee80
Revert "configure lefthook"
54a4d31
Revert "configure lefthook"
d7bf79f
configure lefthook
8d6f81a
configure lefthook
25eb0c5
lint code
1697a12
lint code
600134c
lint code
d400654
add utils.py
db31c39
lint code
662adb1
remove tes models from default models file
4157c5e
separate models into different files
fae0a06
lint code
c5be79a
fix test imports
420bbe6
Merge remote-tracking branch 'origin/models' into config-lefthook
4830de7
lint
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -158,7 +158,7 @@ def validate_content_and_url(cls, values): | |||||
|
||||||
if content_is_set: | ||||||
values["url"] = None | ||||||
elif not url_is_set: | ||||||
elif not content_is_set and not url_is_set: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (code-quality): Remove redundant conditional (
Suggested change
|
||||||
raise ValueError( | ||||||
"The 'url' attribute is required when the 'content' attribute is empty" | ||||||
) | ||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,6 @@ | ||
# EXAMPLE USAGE: | ||
# | ||
# Refer for explanation to following link: | ||
# https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md | ||
# | ||
# pre-push: | ||
# commands: | ||
# packages-audit: | ||
# tags: frontend security | ||
# run: yarn audit | ||
# gems-audit: | ||
# tags: backend security | ||
# run: bundle audit | ||
# | ||
# pre-commit: | ||
# parallel: true | ||
# commands: | ||
# eslint: | ||
# glob: "*.{js,ts,jsx,tsx}" | ||
# run: yarn eslint {staged_files} | ||
# rubocop: | ||
# tags: backend style | ||
# glob: "*.rb" | ||
# exclude: '(^|/)(application|routes)\.rb$' | ||
# run: bundle exec rubocop --force-exclusion {all_files} | ||
# govet: | ||
# tags: backend style | ||
# files: git ls-files -m | ||
# glob: "*.go" | ||
# run: go vet {files} | ||
# scripts: | ||
# "hello.js": | ||
# runner: node | ||
# "any.go": | ||
# runner: go run | ||
pre-push: | ||
commands: | ||
ruff: | ||
files: git diff --name-only --diff-filter=d $(git merge-base origin/main HEAD)..HEAD | ||
run: poetry run ruff check {files} | ||
glob: '*.py' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,7 +69,7 @@ exclude = [ | |
"build", | ||
"_build", | ||
"dist", | ||
".env" | ||
".env", | ||
] | ||
indent-width = 4 | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (code-quality): Inline variable that is immediately returned (
inline-immediately-returned-variable
)