Code formatting with Black - Perfect Python

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 พ.ย. 2024

ความคิดเห็น • 31

  • @justsomeguy6545
    @justsomeguy6545 2 ปีที่แล้ว +21

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

    • @johanohly
      @johanohly 2 ปีที่แล้ว +1

      You won't be regardless

    • @Carberra
      @Carberra  2 ปีที่แล้ว +2

      Glad I could be of service lmao.

  • @Alkatar
    @Alkatar 2 ปีที่แล้ว +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  2 ปีที่แล้ว +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 ปีที่แล้ว +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 5 หลายเดือนก่อน

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

    • @Carberra
      @Carberra  5 หลายเดือนก่อน +1

      Already have! th-cam.com/video/QU3lxjJ0Kbo/w-d-xo.html

  • @Irades
    @Irades ปีที่แล้ว

    Short and informative, thanks :)

  • @justin3594
    @justin3594 ปีที่แล้ว +1

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

    • @anonymeister123
      @anonymeister123 ปีที่แล้ว

      I was thinking it could be a movie reference lol

  • @憂鬱な冒険家
    @憂鬱な冒険家 ปีที่แล้ว

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

    • @Carberra
      @Carberra  ปีที่แล้ว +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: th-cam.com/video/4RuGK3w6Mbs/w-d-xo.html 😄

    • @憂鬱な冒険家
      @憂鬱な冒険家 ปีที่แล้ว

      @@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!!)

  • @ahanjaya
    @ahanjaya 2 ปีที่แล้ว +1

    which VS code themes that you use?

    • @Carberra
      @Carberra  2 ปีที่แล้ว +1

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

  • @0xtz_
    @0xtz_ 2 ปีที่แล้ว +2

    The text is clear and readable 👌

    • @Carberra
      @Carberra  2 ปีที่แล้ว +1

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

    • @0xtz_
      @0xtz_ 2 ปีที่แล้ว +2

      @@Carberra 👌 thanks man

  • @michaeltwist
    @michaeltwist 9 หลายเดือนก่อน

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

  • @zahramanafi4793
    @zahramanafi4793 ปีที่แล้ว

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

  • @savannahsvoice6769
    @savannahsvoice6769 ปีที่แล้ว

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

    • @Carberra
      @Carberra  ปีที่แล้ว +1

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

  • @hamzazahidulislam3490
    @hamzazahidulislam3490 7 หลายเดือนก่อน +1

    Thanks

  • @haskell3702
    @haskell3702 ปีที่แล้ว

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

    • @Carberra
      @Carberra  ปีที่แล้ว +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 ปีที่แล้ว

      @@Carberra thanks anyway!!

  • @thegymteachersgrandma
    @thegymteachersgrandma ปีที่แล้ว

    black . results in Access denied win error5

  • @beaverbuoy3011
    @beaverbuoy3011 2 ปีที่แล้ว +1

    nice

  • @helish_88
    @helish_88 2 ปีที่แล้ว +1

    I love your hairs :)))