Commit Graph

6 Commits

Author SHA1 Message Date
Yerkebulan Tulibergenov 7129418289
Use Python 3 in `scripts/lint.py` (#5617)
<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md)
before opening a Pull Request!

* Keep your PR:s small and focused.
* The PR title is what ends up in the changelog, so make it descriptive!
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to test and add commits to your PR.
* Remember to run `cargo fmt` and `cargo clippy`.
* Open the PR as a draft until you have self-reviewed it and run
`./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.

Please be patient! I will review your PR, but my time is limited!
-->

* [x] I have followed the instructions in the PR template

## Changes

- Use Python 3 in `scripts/lint.py`.

## Why

Some modern OS and distributions do not provide Python 2 by default.
This includes recent macOS versions.
I see that `scripts/generate_changelog.py` already uses Python 3, so I
don't think this change should be controversial.
Without this change, I am unable to run `./scripts/check.sh` on macOS
15.2 without installing Python 2 or adding alias for `python`
executable.
2025-01-22 15:28:38 +01:00
Emil Ernerfeldt f8d7d0ebaa
Enforce writing username in TODO comments (#4235) 2024-03-26 11:48:24 +01:00
Emil Ernerfeldt f7ec8f210d
Use runtime knowledge of OS for OS-specific text editing (#3840)
How text editing behaves depends on what OS we are running on.

`target_os` is a compile-time check, but `ctx.os()` is a runtime check,
that works also on web.
2024-01-19 13:37:10 +01:00
Emil Ernerfeldt 401de05630
Use `Self` everywhere (#3787)
This turns on the clippy lint
[`clippy::use_self`](https://rust-lang.github.io/rust-clippy/v0.0.212/index.html#use_self)
and fixes it everywhere.
2024-01-08 17:41:21 +01:00
Emil Ernerfeldt a243180600
Add `#[inline]` to all builder-pattern functions (#3557)
Better performance and maybe code size
2023-11-16 13:50:05 +01:00
Emil Ernerfeldt d568d9f5d0
Lint vertical spacing in the code (#3224)
* Lint vertical spacing in the code

* Add some vertical spacing for readability
2023-08-10 15:26:54 +02:00