Skip to content

Using attr library instead of attrs in documentation #1162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Why-not-now opened this issue Jul 8, 2023 · 5 comments
Closed

Using attr library instead of attrs in documentation #1162

Why-not-now opened this issue Jul 8, 2023 · 5 comments

Comments

@Why-not-now
Copy link
Contributor

In the documentation, there is a mix of usage of the libraries attr and attrs. One example of this is in here, where the docs referenced attr.evolve and used attrs.evolve in the example code. This confused me on the first read through of the documentation. Is updating the documentation to be using the library attrs in the works?

hynek added a commit that referenced this issue Jul 9, 2023
@hynek
Copy link
Member

hynek commented Jul 9, 2023

Generally speaking we try to use attrs. wherever possible. You actually found bug in the docs, because that attr.evolve used to be a link to the reference but somehow didn't make it through conversion so thanks for that! The rule is kinda that if only one syntax is used, use attrs.. But there's a lot of docs…

@Why-not-now
Copy link
Contributor Author

So is there work being made for the attr module to be replaced by attrs module in the docs? Also glad to help out and all the best to you guys.

@Tinche
Copy link
Member

Tinche commented Jul 11, 2023

Shoot us a PR and we'll gladly merge it in 🙏

@Why-not-now
Copy link
Contributor Author

Shoot us a PR and we'll gladly merge it in 🙏

No problem. I think this weekend I will be free enough to make the PR to fix the docs.

@Why-not-now
Copy link
Contributor Author

Shoot us a PR and we'll gladly merge it in 🙏

There is one paragraph I still do not have a good understanding on:

You can still have power over the attributes if you pass a dictionary of name: field() mappings and can pass arguments to @attr.s:

@Why-not-now Why-not-now mentioned this issue Jul 16, 2023
12 tasks
@hynek hynek closed this as completed Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants