Vaguely Related to Python

PreCommit -What?

I was on the verge to cry–you know the usual when you read extremely complicated documentation which seems to be only meant for professionals? Then I found this https://www.mattlayman.com/blog/2018/python-code-black/

I am going to quote a lot from the blog above! Matt is amazing. 

“Git can run special scripts at various places in the Git workflow (which the system calls “hooks”)” Matt explains. 

I used to think these hooks were not very useful to teams. My belief stemmed from a team’s inability to add these hook scripts to version control in a way that would apply the scripts for every team member.

Matt understands. 

After the install command executes, pre-commit will use a .pre-commit-config.yaml file to make decisions about what to do at the various Git hook points.

At this point, I have learned more than I the time I spent in last one hour (to be very fair, I was on instagram most of the time–so wouldn’t say that it’s anyone’s fault but mine) 

One of those configurations choices is… drumroll please… Black configuration! 

I love Matt, thank fucking god he’s not on tumblr. I am just being weird at this point. Let me explain myself, I am really close to falling asleep and all I have done all day is edit instagram pictures–because I am an addict (worse part, I didn’t even post them) 

I love thinking out loud, and this is me trying that. I hope no one get’s creeped out. (I hope no one reads this in all honestly this is embarrassing)

I added this 

repos:
  - repo: https://github.com/ambv/black
    rev: stable
    hooks:
    - id: black
      language_version: python3.7

To my reop–waiting for something to happen 

READ  Word Prompt : Building Vocabulary one day at a time

IT WORKS! That’s one issue resolved for the day. I am happy. 

One last thing, when you add precommit repo you need to install git hook script

pre-commit install

Whohooo!

Leave a Reply

Uncategorized

PreCommit -What?

I was on the verge to cry–you know the usual when you read extremely complicated documentation which seems to be only meant for professionals? Then I found this https://www.mattlayman.com/blog/2018/python-code-black/

I am going to quote a lot from the blog above! Matt is amazing. 

“Git can run special scripts at various places in the Git workflow (which the system calls “hooks”)” Matt explains. 

I used to think these hooks were not very useful to teams. My belief stemmed from a team’s inability to add these hook scripts to version control in a way that would apply the scripts for every team member.

Matt understands. 

After the install command executes, pre-commit will use a .pre-commit-config.yaml file to make decisions about what to do at the various Git hook points.

At this point, I have learned more than I the time I spent in last one hour (to be very fair, I was on instagram most of the time–so wouldn’t say that it’s anyone’s fault but mine) 

One of those configurations choices is… drumroll please… Black configuration! 

I love Matt, thank fucking god he’s not on tumblr. I am just being weird at this point. Let me explain myself, I am really close to falling asleep and all I have done all day is edit instagram pictures–because I am an addict (worse part, I didn’t even post them) 

I love thinking out loud, and this is me trying that. I hope no one get’s creeped out. (I hope no one reads this in all honestly this is embarrassing)

I added this 

repos:
  - repo: https://github.com/ambv/black
    rev: stable
    hooks:
    - id: black
      language_version: python3.7

To my reop–waiting for something to happen 

READ  Vim Bindings For Collab

IT WORKS! That’s one issue resolved for the day. I am happy.

Leave a Reply