Code formatting with Black - Perfect Python

Sdílet
Vložit
  • čas přidán 7. 09. 2024

Komentáře • 31

  • @justsomeguy6545
    @justsomeguy6545 Před 2 lety +16

    Finally I won’t be hated by everyone I work with

    • @Johnny_JTH
      @Johnny_JTH Před 2 lety +1

      You won't be regardless

    • @Carberra
      @Carberra  Před 2 lety +2

      Glad I could be of service lmao.

  • @Alkatar
    @Alkatar Před 2 lety +2

    3:30 There is something for strings: `--skip-string-normalization`. I know this from many projects and then quotes are not changed. This is very useful.

    • @Carberra
      @Carberra  Před 2 lety +1

      Ah okay. For those interested, that could also be put in a pyproject.toml file to save having to use the CLI flag each time.

  • @bp56789
    @bp56789 Před 10 měsíci +1

    5:22 It didn't change the quotes inside because that would change the actual variable: A string that contains " is different for a string that contains '.

  • @farazahmed1668
    @farazahmed1668 Před 2 měsíci

    that is so useful, please also make a video on automatic formatting using black by pressing alt + shift + F.

    • @Carberra
      @Carberra  Před 2 měsíci +1

      Already have! czcams.com/video/QU3lxjJ0Kbo/video.html

  • @Irades
    @Irades Před rokem

    Short and informative, thanks :)

  • @justin3594
    @justin3594 Před rokem +1

    88 is because that’s the speed to go back in time.

  • @hamzazahidulislam3490
    @hamzazahidulislam3490 Před 5 měsíci +1

    Thanks

  • @0xtz_
    @0xtz_ Před 2 lety +2

    The text is clear and readable 👌

    • @Carberra
      @Carberra  Před 2 lety +1

      Amazing -- I'll try and remember this scale factor in future (:

    • @0xtz_
      @0xtz_ Před 2 lety +2

      @@Carberra 👌 thanks man

  • @zahramanafi4793
    @zahramanafi4793 Před rokem

    I use Pycharm, and "black" doesn't work on my laptop. Is there anyone who can help me?

  • @michaeltwist
    @michaeltwist Před 6 měsíci

    88 Characters, maybe they were fans of "Kill Bill", and a crazy 88.

  • @savannahsvoice6769
    @savannahsvoice6769 Před rokem

    when i do this, and then save it it reverts back to the previous formatting. how could i prevent this.

    • @Carberra
      @Carberra  Před rokem +1

      You've probably got some setting enabled in your editor. Head into the settings and search for anything formatting related.

  • @ahanjaya
    @ahanjaya Před rokem +1

    which VS code themes that you use?

    • @Carberra
      @Carberra  Před rokem +1

      Ayu Mirage Bordered. There's a video on the channel about it which you might be interested in.

  • @user-cr9ix2mg5u
    @user-cr9ix2mg5u Před 9 měsíci

    and how did you get the zsh terminal (and that nice looking terminal) for windows?

    • @Carberra
      @Carberra  Před 9 měsíci +1

      Font is Fira Code Nerd Font (saw your other comment but can't find it again). I use Windows Terminal and WSL, so you can just use that like you would Linux. All the looks are explained here: czcams.com/video/4RuGK3w6Mbs/video.html 😄

    • @user-cr9ix2mg5u
      @user-cr9ix2mg5u Před 9 měsíci

      @@Carberra thanks. i found your other video about your setup, so it cleared up the font question. really appreciate your content man, looking forward to more vids! (preferably code tutorials and technical things!!)

  • @haskell3702
    @haskell3702 Před rokem

    how can I configure Black on VS 2022 (no Code)?

    • @Carberra
      @Carberra  Před rokem +1

      Not sure, the two work completely differently, despite the name. It'd still work in a terminal, but I can't help you with VS config, soz.

    • @haskell3702
      @haskell3702 Před rokem

      @@Carberra thanks anyway!!

  • @beaverbuoy3011
    @beaverbuoy3011 Před 2 lety +1

    nice

  • @thegymteachersgrandma
    @thegymteachersgrandma Před 11 měsíci

    black . results in Access denied win error5

  • @helish_88
    @helish_88 Před 2 lety +1

    I love your hairs :)))