Comments (15)
It sounds like a really python centric/minded/focused project, so no reason to use other language's styles.
We can set up a linter when we have decided the code-style to be used. Also do you know any code prettifiers for python I couldn't find anything else than yapf
If the linter detects any error the pass will fail and won't be merged until a new commit (added to the PR) fix that. I fail to see why to automatically prettify the code... :/
Tools to take a look at:
from 30-seconds-of-python.
@lsrdg Wait that is an error in the contributing.md. Just remove the PEP8 link. PR it if you want to 👍
from 30-seconds-of-python.
If it is just that I can do it right now, but are you sure? I thought the PR would be the other way around: rename the functions, so that all functions follow the same style.
from 30-seconds-of-python.
No actually first I thought of following the PEP8 guidelines but then I met yapf. So I updated it but forgot to remove the PEP8 part. If you are busy I shall do it.
from 30-seconds-of-python.
I think you should it, even better if you clarify why the project is taking this specific direction. Since it is a python project, I would rather follow pep8, flake8, pylint etc and not what google has to say about that, but totally respect your decision. (=
from 30-seconds-of-python.
from 30-seconds-of-python.
In python, I guess "we are all adults"... but maybe it helps if you define the target(s) user(s) group(s)?
If most users are coming here after knowing the javascript version, the js naming style would be one less thing to worry about and people would focus on the code itself.
Experienced programmers just getting started with python will use their own filters to decide what to use or not.
However, people just starting their path (python as a first language) might need a reinforcement of good code style. Intermediates who are constancy reading the docs won't have a problem with that, but it might be a mental relief to know what type an object is just by staring at it.
You can also just set up a linter of your choice on travis and tell people that their PR will be merged when all tests are passing.
What are your thoughts on the topic?
from 30-seconds-of-python.
The target users are both beginners who have just started learning python to experts (adults
) who use it daily. We will be helping the beginners as each of our code is accompanied with a short and clear description about the inbuilt python function and modules we use. We will help the everyday users by providing copy-paste snippets that might need to use on a regular basis. (Although it is not the main focus but we might provide a library/module with all the snippets).
No we are not going to get any traffic from the Javascript version as this project is not mentioned anywhere in their project.
Yeah I think you are right about reinforcing good code style and I think I have included a checkbox if the code style of this project is used by there code in the PR-template. I believe there are many code-styles which have little differences. We should use the most used one so that most of the advanced users are comfortable with it.
Yeah I think you are right about mention somewhere that there PR will be merged when tests pass. I think we can even ensure that there examples are working as intended. We can set up a linter when we have decided the code-style to be used. Also do you know any code prettifiers for python I couldn't find anything else than yapf
from 30-seconds-of-python.
I went through all them and came to the conclusion that they check your code for errors .
I also searched for them on Google and read that pylint has many unnecessary errors and warnings.
But I really liked autopep8 and I think it prettifies your code too.
So I think we have made a decision but I wanted your opinions on it.
Also would like to submit a PR to integrate autopep8. I might be able to do you it after reading the documentation but as you are more experienced you will do it better.
from 30-seconds-of-python.
Hey guys I just found this looks pretty good for pep8 too...
from 30-seconds-of-python.
I've used flake8 and autopep8 in a project, but when I tried pylint (locally) it did point to so many stuff that I learned a lot. I'm using flake8 on travis and pylint locally for my own sake... whichever tool you choose will give a decent code style, but again I fail to see why the code should be automatically prettified. (:
but as you are more experienced you will do it better.
Nope. Just a learner as well. It is nice to open the space for discussion, but as the maintainer it is up to you @kriadmin to take a decision. We always assign an issue to ourselves or open an issue to discuss whatever is relevant. (:
@Rob-Rychs , well pointed. That's what I liked about flake8:
Flake8 is a wrapper around these tools:
- PyFlakes
- pycodestyle
- Ned Batchelder's McCabe script
from 30-seconds-of-python.
@lsrdg I want to auto-prettify code because some people really like to write babdly formatted code(I am an example).
@Rob-Rychs I will check that out in the evening today(I am +5:30) and will be busy today. And after checking it out I will decide on one(hopefully) and then integrate it for travis-ci
from 30-seconds-of-python.
@kriadmin aha, no problems. Probably I'm just on the side of the people who really enjoy using a text editor :P
In this case, you can create another branch to test the linter+prettifier and we can keep the discussion on the PR, what do you think?
from 30-seconds-of-python.
Yes I was thinking of making a branch to test it but I am really busy because I have exams coming. Still I will try my best to make a PR soon.
from 30-seconds-of-python.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for any follow-up tasks.
from 30-seconds-of-python.
Related Issues (20)
- Improving `sum_of_powers` snippet HOT 2
- Can I add a string_chunk HOT 4
- time complexity improv of frequencies.md HOT 4
- improvement in fibbonocci code HOT 1
- Making median code a bit more precise. HOT 1
- List of possible snippets HOT 4
- xor HOT 1
- without HOT 1
- Selecting a random element from a given sequence HOT 1
- Improvement in time complexity. HOT 1
- Some suggestions to improve `bifurcate`, `find_last_index` and more HOT 5
- Ideas to improve `count_by` and others HOT 3
- Issue in `byte_size` snippets
- New snippet circular rotate
- Removed the hacktoberfest label? :/ HOT 1
- combine_values.md Sample code output is incorrect
- reverse_number Wrong output HOT 1
- bug :num_to_range
- optimization:unfold HOT 1
- Active & accepting PRs for Hacktoberfest 2021? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 30-seconds-of-python.