mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-08-24 02:24:23 -05:00
attempt to "commonize" prettier config (#18297)
* attempt to "commonize" prettier config * apply to md * manual touchup
This commit is contained in:
@@ -3,22 +3,17 @@
|
||||
- In order to be merged, you must add the most appropriate category Label (Added, Changed, Fixed) to your PR
|
||||
-->
|
||||
<!-- Explain why this is an improvement (Does this add missing functionality, improve performance, or reduce complexity?) -->
|
||||
|
||||
### Purpose:
|
||||
|
||||
|
||||
|
||||
<!-- Does this PR introduce a breaking change? -->
|
||||
|
||||
### Current Behavior:
|
||||
|
||||
|
||||
|
||||
### New Behavior:
|
||||
|
||||
|
||||
|
||||
<!-- As we aim for complete code coverage, please include details regarding unit, and regression tests -->
|
||||
|
||||
### Testing Notes:
|
||||
|
||||
|
||||
|
||||
<!-- Attach any visual examples, or supporting evidence (attach any .gif/video/console output below) -->
|
||||
|
||||
@@ -32,7 +32,7 @@ repos:
|
||||
rev: v3.1.0
|
||||
hooks:
|
||||
- id: prettier
|
||||
types_or: [ini, json, toml, yaml]
|
||||
types_or: [ini, json, toml, yaml, markdown]
|
||||
- repo: https://github.com/scop/pre-commit-shfmt
|
||||
rev: v3.8.0-1
|
||||
hooks:
|
||||
|
||||
@@ -5,3 +5,10 @@ overrides:
|
||||
singleQuote: false
|
||||
experimentalTernaries: true
|
||||
useTabs: false
|
||||
- files: ["*.md"]
|
||||
options:
|
||||
singleQuote: false
|
||||
- files: ["*.js", "*.jsx", "*.ts", "*.tsx", "*.cjs", "*.mjs"]
|
||||
options:
|
||||
printWidth: 120
|
||||
singleQuote: true
|
||||
|
||||
+2
-2
@@ -24,8 +24,8 @@ Timelord uses to run the VDF and prove the Proof of Time is `vdf_client` and
|
||||
`vdf_bench` is a utility to get a sense of a given CPU's iterations per second.
|
||||
|
||||
- To build vdf_client set the environment variable BUILD_VDF_CLIENT to "Y".
|
||||
`export BUILD_VDF_CLIENT=Y`.
|
||||
`export BUILD_VDF_CLIENT=Y`.
|
||||
- Similarly, to build vdf_bench set the environment variable BUILD_VDF_BENCH
|
||||
to "Y". `export BUILD_VDF_BENCH=Y`.
|
||||
to "Y". `export BUILD_VDF_BENCH=Y`.
|
||||
|
||||
Building and running Timelords in Windows x86-64 is not yet supported.
|
||||
|
||||
+359
-320
File diff suppressed because it is too large
Load Diff
+13
-13
@@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
- Using welcoming and inclusive language
|
||||
- Being respectful of differing viewpoints and experiences
|
||||
- Gracefully accepting constructive criticism
|
||||
- Focusing on what is best for the community
|
||||
- Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Insulting/derogatory comments, and personal or political attacks, or excessive trolling.
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
- The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
- Insulting/derogatory comments, and personal or political attacks, or excessive trolling.
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
- Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Legacy Software and Operating System Support Policy
|
||||
|
||||
It is the official policy of the Chia Blockchain project to end software support when the original maintainer of the software deems it End of Life (EOL) or stops providing support. The most relevant targets of this policy are Python, Node.js, and operating systems.
|
||||
It is the official policy of the Chia Blockchain project to end software support when the original maintainer of the software deems it End of Life (EOL) or stops providing support. The most relevant targets of this policy are Python, Node.js, and operating systems.
|
||||
|
||||
## Long-term Support Conflicts
|
||||
|
||||
|
||||
@@ -115,7 +115,6 @@ def use_open_directly(path: Path):
|
||||
return file.read()
|
||||
```
|
||||
|
||||
|
||||
### Context managers for single use scenarios
|
||||
|
||||
Even when no reuse is necessary there are still reasons to use context managers.
|
||||
@@ -146,13 +145,11 @@ def f(x, y, z):
|
||||
z.process(x, y)
|
||||
```
|
||||
|
||||
|
||||
### Examples
|
||||
|
||||
- https://github.com/Chia-Network/chia-blockchain/pull/11467
|
||||
- https://github.com/Chia-Network/chia-blockchain/pull/10166
|
||||
|
||||
|
||||
## Classes
|
||||
|
||||
There are a few basic goals for classes that are targeted by the guidance provided below.
|
||||
@@ -437,7 +434,6 @@ class ThreeIntAdder(Protocol):
|
||||
Another option for additional expressivity around hinting a callable with a protocol is to use overloads to narrow the possible combinations of calls.
|
||||
It is often better to just avoid overload situations, but as we retrofit hints to existing code we may prefer this option sometimes.
|
||||
|
||||
|
||||
### Type variables
|
||||
|
||||
`TypeVar` allows you to create 'variables' for type hints.
|
||||
@@ -617,8 +613,8 @@ class SomeWallet:
|
||||
|
||||
## Tests
|
||||
|
||||
- Do not import `test_*` modules. Instead locate shared tooling in non-test files within the `tests/` directory or subdirectories.
|
||||
- Do not import fixtures. Fixtures are shared by locating them in `conftest.py` files at whatever directory layer you want them to be recursively available from.
|
||||
- Do not import `test_*` modules. Instead locate shared tooling in non-test files within the `tests/` directory or subdirectories.
|
||||
- Do not import fixtures. Fixtures are shared by locating them in `conftest.py` files at whatever directory layer you want them to be recursively available from.
|
||||
- Do not use test classes.
|
||||
`unittest` requires that tests be held in a class.
|
||||
pytest does not.
|
||||
@@ -647,7 +643,7 @@ class SomeWallet:
|
||||
|
||||
## Idioms
|
||||
|
||||
- Avoid use of non-booleans as booleans such as `if the_list:`. If you mean `if len(the_list) > 0:` write that, if you mean `if an_optional_thing is not None:` write that.
|
||||
- Avoid use of non-booleans as booleans such as `if the_list:`. If you mean `if len(the_list) > 0:` write that, if you mean `if an_optional_thing is not None:` write that.
|
||||
|
||||
## Exceptions
|
||||
|
||||
@@ -665,7 +661,6 @@ You want the code to fail quickly and clearly with a `NameError`, not silently c
|
||||
This is why linters discourage bare `except:` and overly broad `except Exception:` clauses.
|
||||
Especially don't `except BaseException:` as that can consume even shutdown requests.
|
||||
|
||||
|
||||
```python
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
@@ -2,20 +2,21 @@
|
||||
|
||||
[![Chia Network logo][logo-chia]][link-chia]
|
||||
|
||||
| Releases | Repo Stats | Socials |
|
||||
| -------- | ---------- | ------- |
|
||||
[![Latest Release][badge-release]][link-latest] <br /> [![Latest RC][badge-rc]][link-release] <br /> [![Latest Beta][badge-beta]][link-release] | [![Coverage][badge-coverage]][link-coverage] <br /> [![Downloads][badge-downloads]][link-downloads] <br /> [![Commits][badge-commits]][link-commits] <br /> [![Contributers][badge-contributers]][link-contributers] | [![Discord][badge-discord]][link-discord] <br /> [![YouTube][badge-youtube]][link-youtube] <br /> [![Reddit][badge-reddit]][link-reddit] <br /> [![Twitter][badge-twitter]][link-twitter]
|
||||
| Releases | Repo Stats | Socials |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [![Latest Release][badge-release]][link-latest] <br /> [![Latest RC][badge-rc]][link-release] <br /> [![Latest Beta][badge-beta]][link-release] | [![Coverage][badge-coverage]][link-coverage] <br /> [![Downloads][badge-downloads]][link-downloads] <br /> [![Commits][badge-commits]][link-commits] <br /> [![Contributers][badge-contributers]][link-contributers] | [![Discord][badge-discord]][link-discord] <br /> [![YouTube][badge-youtube]][link-youtube] <br /> [![Reddit][badge-reddit]][link-reddit] <br /> [![Twitter][badge-twitter]][link-twitter] |
|
||||
|
||||
Chia is a modern cryptocurrency built from scratch, designed to be efficient, decentralized, and secure. Here are some of the features and benefits:
|
||||
* [Proof of space and time][link-consensus] based consensus which allows anyone to farm with commodity hardware
|
||||
* Very easy to use full node and farmer GUI and cli (thousands of nodes active on mainnet)
|
||||
* [Chia seeder][link-seeder], which maintains a list of reliable nodes within the Chia network via a built-in DNS server.
|
||||
* Simplified UTXO based transaction model, with small on-chain state
|
||||
* Lisp-style Turing-complete functional [programming language][link-chialisp] for money related use cases
|
||||
* BLS keys and aggregate signatures (only one signature per block)
|
||||
* [Pooling protocol][link-pool] that allows farmers to have control of making blocks
|
||||
* Support for light clients with fast, objective syncing
|
||||
* A growing community of farmers and developers around the world
|
||||
|
||||
- [Proof of space and time][link-consensus] based consensus which allows anyone to farm with commodity hardware
|
||||
- Very easy to use full node and farmer GUI and cli (thousands of nodes active on mainnet)
|
||||
- [Chia seeder][link-seeder], which maintains a list of reliable nodes within the Chia network via a built-in DNS server.
|
||||
- Simplified UTXO based transaction model, with small on-chain state
|
||||
- Lisp-style Turing-complete functional [programming language][link-chialisp] for money related use cases
|
||||
- BLS keys and aggregate signatures (only one signature per block)
|
||||
- [Pooling protocol][link-pool] that allows farmers to have control of making blocks
|
||||
- Support for light clients with fast, objective syncing
|
||||
- A growing community of farmers and developers around the world
|
||||
|
||||
Please check out the [Chia website][link-chia], the [Intro to Chia][link-intro], and [FAQ][link-faq] for information on this project.
|
||||
|
||||
@@ -38,39 +39,37 @@ Install instructions are available in the [Installation Details][link-install] s
|
||||
|
||||
Once installed, an [Intro to Chia][link-intro] guide is available in the [Chia Docs][link-docs].
|
||||
|
||||
[badge-beta]: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fdownload.chia.net%2Flatest%2Fbadge-data-beta.json&query=%24.message&logo=chianetwork&logoColor=black&label=Latest%20Beta&labelColor=%23e9fbbc&color=%231e2b2e
|
||||
[badge-beta2]: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fdownload.chia.net%2Flatest%2Fbadge-data-beta.json&query=%24.message&logo=chianetwork&logoColor=%23e9fbbc&label=Latest%20Beta&labelColor=%23474748&color=%231e2b2e&link=https%3A%2F%2Fgithub.com%2FChia-Network%2Fchia-blockchain%2Freleases&link=https%3A%2F%2Fgithub.com%2FChia-Network%2Fchia-blockchain%2Freleases
|
||||
[badge-commits]: https://img.shields.io/github/commit-activity/w/Chia-Network/chia-blockchain?logo=GitHub
|
||||
[badge-beta]: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fdownload.chia.net%2Flatest%2Fbadge-data-beta.json&query=%24.message&logo=chianetwork&logoColor=black&label=Latest%20Beta&labelColor=%23e9fbbc&color=%231e2b2e
|
||||
[badge-beta2]: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fdownload.chia.net%2Flatest%2Fbadge-data-beta.json&query=%24.message&logo=chianetwork&logoColor=%23e9fbbc&label=Latest%20Beta&labelColor=%23474748&color=%231e2b2e&link=https%3A%2F%2Fgithub.com%2FChia-Network%2Fchia-blockchain%2Freleases&link=https%3A%2F%2Fgithub.com%2FChia-Network%2Fchia-blockchain%2Freleases
|
||||
[badge-commits]: https://img.shields.io/github/commit-activity/w/Chia-Network/chia-blockchain?logo=GitHub
|
||||
[badge-contributers]: https://img.shields.io/github/contributors/Chia-Network/chia-blockchain?logo=GitHub
|
||||
[badge-coverage]: https://img.shields.io/coverallsCoverage/github/Chia-Network/chia-blockchain?logo=Coveralls&logoColor=red&labelColor=%23212F39
|
||||
[badge-discord]: https://dcbadge.vercel.app/api/server/chia?style=flat-square&theme=full-presence
|
||||
[badge-discord2]: https://img.shields.io/discord/1034523881404370984.svg?label=Discord&logo=discord&colorB=1e2b2f
|
||||
[badge-downloads]: https://img.shields.io/github/downloads/Chia-Network/chia-blockchain/total?logo=GitHub
|
||||
[badge-rc]: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fdownload.chia.net%2Flatest%2Fbadge-data-rc.json&query=%24.message&logo=chianetwork&logoColor=white&label=Latest%20RC&labelColor=%230d3349&color=%23474748
|
||||
[badge-reddit]: https://img.shields.io/reddit/subreddit-subscribers/chia?style=flat-square&logo=reddit&labelColor=%230b1416&color=%23222222
|
||||
[badge-release]: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fdownload.chia.net%2Flatest%2Fbadge-data.json&query=%24.message&logo=chianetwork&label=Latest%20Release&labelColor=%231e2b2e&color=%230d3349
|
||||
[badge-twitter]: https://img.shields.io/twitter/follow/chia_project?style=flat-square&logo=x.org&logoColor=white&labelColor=black
|
||||
[badge-youtube]: https://img.shields.io/youtube/channel/subscribers/UChFkJ3OAUvnHZdiQISWdWPA?style=flat-square&logo=youtube&logoColor=%23ff0000&labelColor=%230f0f0f&color=%23272727
|
||||
|
||||
[link-chia]: https://www.chia.net/
|
||||
[link-chialisp]: https://chialisp.com/
|
||||
[link-commits]: https://github.com/Chia-Network/chia-blockchain/commits/main/
|
||||
[link-consensus]: https://docs.chia.net/consensus-intro/
|
||||
[link-contributers]: https://github.com/Chia-Network/chia-blockchain/graphs/contributors
|
||||
[link-coverage]: https://coveralls.io/github/Chia-Network/chia-blockchain
|
||||
[link-discord]: https://discord.gg/chia
|
||||
[link-docs]: https://docs.chia.net/docs-home/
|
||||
[link-downloads]: https://www.chia.net/downloads/
|
||||
[link-faq]: https://docs.chia.net/faq/
|
||||
[link-install]: https://docs.chia.net/installation/
|
||||
[link-intro]: https://docs.chia.net/introduction/
|
||||
[link-latest]: https://github.com/Chia-Network/chia-blockchain/releases/latest
|
||||
[link-pool]: https://docs.chia.net/pool-farming/
|
||||
[link-reddit]: https://www.reddit.com/r/chia/
|
||||
[link-release]: https://github.com/Chia-Network/chia-blockchain/releases
|
||||
[link-seeder]: https://docs.chia.net/guides/seeder-user-guide/
|
||||
[link-twitter]: https://twitter.com/chia_project
|
||||
[link-upnp]: https://www.homenethowto.com/ports-and-nat/upnp-automatic-port-forward/
|
||||
[link-youtube]: https://www.youtube.com/chianetwork
|
||||
|
||||
[logo-chia]: https://www.chia.net/wp-content/uploads/2022/09/chia-logo.svg "Chia logo"
|
||||
[badge-coverage]: https://img.shields.io/coverallsCoverage/github/Chia-Network/chia-blockchain?logo=Coveralls&logoColor=red&labelColor=%23212F39
|
||||
[badge-discord]: https://dcbadge.vercel.app/api/server/chia?style=flat-square&theme=full-presence
|
||||
[badge-discord2]: https://img.shields.io/discord/1034523881404370984.svg?label=Discord&logo=discord&colorB=1e2b2f
|
||||
[badge-downloads]: https://img.shields.io/github/downloads/Chia-Network/chia-blockchain/total?logo=GitHub
|
||||
[badge-rc]: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fdownload.chia.net%2Flatest%2Fbadge-data-rc.json&query=%24.message&logo=chianetwork&logoColor=white&label=Latest%20RC&labelColor=%230d3349&color=%23474748
|
||||
[badge-reddit]: https://img.shields.io/reddit/subreddit-subscribers/chia?style=flat-square&logo=reddit&labelColor=%230b1416&color=%23222222
|
||||
[badge-release]: https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fdownload.chia.net%2Flatest%2Fbadge-data.json&query=%24.message&logo=chianetwork&label=Latest%20Release&labelColor=%231e2b2e&color=%230d3349
|
||||
[badge-twitter]: https://img.shields.io/twitter/follow/chia_project?style=flat-square&logo=x.org&logoColor=white&labelColor=black
|
||||
[badge-youtube]: https://img.shields.io/youtube/channel/subscribers/UChFkJ3OAUvnHZdiQISWdWPA?style=flat-square&logo=youtube&logoColor=%23ff0000&labelColor=%230f0f0f&color=%23272727
|
||||
[link-chia]: https://www.chia.net/
|
||||
[link-chialisp]: https://chialisp.com/
|
||||
[link-commits]: https://github.com/Chia-Network/chia-blockchain/commits/main/
|
||||
[link-consensus]: https://docs.chia.net/consensus-intro/
|
||||
[link-contributers]: https://github.com/Chia-Network/chia-blockchain/graphs/contributors
|
||||
[link-coverage]: https://coveralls.io/github/Chia-Network/chia-blockchain
|
||||
[link-discord]: https://discord.gg/chia
|
||||
[link-docs]: https://docs.chia.net/docs-home/
|
||||
[link-downloads]: https://www.chia.net/downloads/
|
||||
[link-faq]: https://docs.chia.net/faq/
|
||||
[link-install]: https://docs.chia.net/installation/
|
||||
[link-intro]: https://docs.chia.net/introduction/
|
||||
[link-latest]: https://github.com/Chia-Network/chia-blockchain/releases/latest
|
||||
[link-pool]: https://docs.chia.net/pool-farming/
|
||||
[link-reddit]: https://www.reddit.com/r/chia/
|
||||
[link-release]: https://github.com/Chia-Network/chia-blockchain/releases
|
||||
[link-seeder]: https://docs.chia.net/guides/seeder-user-guide/
|
||||
[link-twitter]: https://twitter.com/chia_project
|
||||
[link-upnp]: https://www.homenethowto.com/ports-and-nat/upnp-automatic-port-forward/
|
||||
[link-youtube]: https://www.youtube.com/chianetwork
|
||||
[logo-chia]: https://www.chia.net/wp-content/uploads/2022/09/chia-logo.svg "Chia logo"
|
||||
|
||||
Reference in New Issue
Block a user