-
Notifications
You must be signed in to change notification settings - Fork 52
Feature/add githooks #224
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
Feature/add githooks #224
Conversation
…lso trying to put yapf too
…lso trying to put yapf too
…into feature/add_githooks
2. [Python](https://www.python.org/downloads/release/python-385/) | ||
3. Install pre-commit hooks: | ||
```shell | ||
pre-commit install |
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.
This comment doesn't work on my shell. Maybe it requires some another prerequisite?
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.
I changed it and I think it will work for you (and everyone else too) now :)
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.
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.
but I change it, ok now it is correct
you need to install the requirements before
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.
Maybe you've changed the requirements.txt and forgot to push it?
Currently I don't have anything in the requirements.txt that installs the pre-commit
command, unfortunately :(
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.
oh no, your right, my mistake
I fixed it now
…into feature/add_githooks
…into feature/add_githooks
The hooks need to be installed.
After this every commited file will be checked for style and also fixed if possible Hope it will help everyone :) |
app/routers/event.py
Outdated
|
||
event = create_event(session, title, start, end, owner_id, content, | ||
location, invited_emails, category_id=category_id) | ||
event = create_event(session, |
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.
please revert thie change
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.
went back to original, sorry
app/routers/event.py
Outdated
start_format = '%A, %d/%m/%Y %H:%M' | ||
end_format = ('%H:%M' if event.start.date() == event.end.date() | ||
else start_format) | ||
end_format = ('%H:%M' |
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.
I think the prev format was more readable
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.
went back to original, sorry
app/routers/event.py
Outdated
|
||
|
||
def create_event(db: Session, title: str, start, end, owner_id: int, | ||
def create_event(db: Session, |
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.
Please revert this change
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.
went back to original, sorry
…into feature/add_githooks
2. [Python](https://www.python.org/downloads/release/python-385/) | ||
3. Install pre-commit hooks: | ||
```shell | ||
pre-commit install |
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.
2. [Python](https://www.python.org/downloads/release/python-385/) | ||
3. Install pre-commit hooks: | ||
```shell | ||
pre-commit install |
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.
Maybe you've changed the requirements.txt and forgot to push it?
Currently I don't have anything in the requirements.txt that installs the pre-commit
command, unfortunately :(
…into feature/add_githooks
Codecov Report
@@ Coverage Diff @@
## develop #224 +/- ##
========================================
Coverage 99.40% 99.40%
========================================
Files 47 47
Lines 2171 2171
========================================
Hits 2158 2158
Misses 13 13 Continue to review full report at Codecov.
|
this is for Add git hooks for pre-commit flake8 #196
Used pre-commit for adding git hooks before doing commit
The hooks do flake8 checks like in the github actions
Also did yapf for making the code look good and fit flake8 style