attempt to "commonize" prettier config (#18297)

* attempt to "commonize" prettier config

* apply to md

* manual touchup
This commit is contained in:
Kyle Altendorf
2024-07-15 12:36:34 -07:00
committed by GitHub
parent 1a7d722714
commit dfa0557ca2
9 changed files with 435 additions and 400 deletions
+3 -8
View File
@@ -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) -->
+1 -1
View File
@@ -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:
+7
View File
@@ -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
View File
@@ -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.
+353 -314
View File
File diff suppressed because it is too large Load Diff
+10 -10
View File
@@ -14,21 +14,21 @@ 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
- 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
- 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
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
-5
View File
@@ -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.
@@ -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
+12 -13
View File
@@ -3,19 +3,20 @@
[![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]
| ----------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [![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.
@@ -51,7 +52,6 @@ Once installed, an [Intro to Chia][link-intro] guide is available in the [Chia D
[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/
@@ -72,5 +72,4 @@ Once installed, an [Intro to Chia][link-intro] guide is available in the [Chia D
[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"