GithubHelp home page GithubHelp logo

za / blackened Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 18 KB

A simple git repo to demonstrate pre-commit using Black Python formatter

License: GNU General Public License v3.0

Python 100.00%

blackened's Introduction

A simple repo to demonstrate how we can run black before committing the changes.

(.venv) ➜  blackened git:(main) ✗ gc
[WARNING] The 'rev' field of repo 'https://github.com/psf/black' appears to be a mutable reference (moving tag / branch).  Mutable references are never updated after first install and are not supported.  See https://pre-commit.com/#using-the-latest-version-for-a-repository for more details.  Hint: `pre-commit autoupdate` often fixes this.
black....................................................................Failed
- hook id: black
- files were modified by this hook

reformatted hi.py

All done! ✨ 🍰 ✨
1 file reformatted.


diff --git a/hi.py b/hi.py
index a8e37b7..cfe2320 100644
--- a/hi.py
+++ b/hi.py
@@ -1,7 +1,8 @@
 #!/usr/bin/python3
 
-a= 3
-b= 4
+a = 3
+b = 4
 
-def hola(a,b):
-    print('hihihi ')
+
+def hola(a, b):
+    print("hihihi ")

Reference: https://ljvmiranda921.github.io/notebook/2018/06/21/precommits-using-black-and-flake8/

blackened's People

Contributors

za avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.