Giter Site home page Giter Site logo

Comments (10)

ThePat02 avatar ThePat02 commented on August 21, 2024 2

trailing commas are often good practice in longer lists because it's harder to forget one when you extend them xD

Yeah, my uni doesnt want them tho

Already fixed it for the 2.0 branch

from behaviourtoolkit.

ThePat02 avatar ThePat02 commented on August 21, 2024 1

Or maybe you use external editor and it had configured indents as spaces by default?

Yes, I indeed use Visual Studio Code, because I think it is WAY better than the embedded editor. My university has us use spaces instead of tabs

But you are right! When I update the whole code for 2.0.0 I will replace all tabs with spaces. Luckily there is a shortcut for that

from behaviourtoolkit.

ThePat02 avatar ThePat02 commented on August 21, 2024 1

I think it is actually set to this by default, but at some point I was writing some code on a Codespace and pasted it in. I think that's when I converted most of the tabs to spaces lol

from behaviourtoolkit.

ThePat02 avatar ThePat02 commented on August 21, 2024 1

We are going to use gdformat from https://github.com/Scony/godot-gdscript-toolkit whenever 2.0 is ready.

from behaviourtoolkit.

SirPigeonz avatar SirPigeonz commented on August 21, 2024

Or maybe you use external editor and it had configured indents as spaces by default?

Yes, I indeed use Visual Studio Code, because I think it is WAY better than the embedded editor. My university has us use spaces instead of tabs

Yup I use VSCode for Python and use 4 spaces there like PEP8 is demanding :) Probably thats why they demanded of you to use 4spaces it's a convention in Python :)

But you are right! When I update the whole code for 2.0.0 I will replace all tabs with spaces. Luckily there is a shortcut for that

Awesome!

from behaviourtoolkit.

SirPigeonz avatar SirPigeonz commented on August 21, 2024

Oh, a tip, you can configure VSC to use tabs for .gd files I just don't remember how not a VSC power user yet xD and I use Godot for GDS so never checked how to do that...

from behaviourtoolkit.

ThePat02 avatar ThePat02 commented on August 21, 2024

New GitHub action for automatically formatting this repo has been added!

from behaviourtoolkit.

SirPigeonz avatar SirPigeonz commented on August 21, 2024

New GitHub action for automatically formatting this repo has been added!

I've seen you had to revert it's effects.
It did the opposite and switched tabs to spaces xD
Also, it broke enums because they didn't have , on the last enum. I think it will treat them as vertical enums if they will have one...

I haven't looked into this tool yet so I don't know how to change the indentation situation :/

from behaviourtoolkit.

ThePat02 avatar ThePat02 commented on August 21, 2024

I've seen you had to revert it's effects.

That was just to test things out.

It did the opposite and switched tabs to spaces xD

I don't think it did? Looks fine to me!

Also, it broke enums because they didn't have , on the last enum. I think it will treat them as vertical enums if they will have one...

Good point, I was looking for a fix!

from behaviourtoolkit.

SirPigeonz avatar SirPigeonz commented on August 21, 2024

It did the opposite and switched tabs to spaces xD

I don't think it did? Looks fine to me!

Oh, you are right! It switched spaces to tabs correctly. I must have checked on revert commit... xD

Good point, I was looking for a fix!

No prob :)

It is explained here, that it needs trailing comma on last element (comment on the end of the array):
https://github.com/Scony/godot-gdscript-toolkit#formatting-with-gdformat-more

trailing commas are often good practice in longer lists because it's harder to forget one when you extend them xD

from behaviourtoolkit.

Related Issues (20)

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.