Skip to content

[pre-commit.ci] pre-commit suggestions #19723

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

Merged
merged 4 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ repos:
- id: sphinx-lint

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.2
rev: v0.3.5
hooks:
# try to fix what is possible
- id: ruff
Expand All @@ -97,7 +97,7 @@ repos:
)$

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
rev: v4.0.0-alpha.8
hooks:
- id: prettier
# https://prettier.io/docs/en/options.html#print-width
Expand Down
2 changes: 1 addition & 1 deletion src/lightning/app/cli/pl-app-template/ui/craco.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const cracoBabelLoader = require("craco-babel-loader");

// manage relative paths to packages
const appDirectory = fs.realpathSync(process.cwd());
const resolvePackage = relativePath => path.resolve(appDirectory, relativePath);
const resolvePackage = (relativePath) => path.resolve(appDirectory, relativePath);

module.exports = {
devServer: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default function EnvironmentConfigurator(props: any) {
<Stack direction="row" spacing={1}>
<TextField
helperText=""
onChange={e => onItemChange("name", index, e)}
onChange={(e) => onItemChange("name", index, e)}
placeholder="KEY"
size="medium"
statusText=""
Expand All @@ -51,7 +51,7 @@ export default function EnvironmentConfigurator(props: any) {
/>
<TextField
helperText=""
onChange={e => onItemChange("value", index, e)}
onChange={(e) => onItemChange("value", index, e)}
placeholder="VALUE"
size="medium"
statusText=""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ export default function HyperparameterSummary(props: any) {

const [searched, setSearched] = useState<string>("");
const filteredModelHparams = model_hparams_keys
.filter(key => key.toLowerCase().includes(searched.toLowerCase()))
.map(key => [key, model_hparams[key]]);
.filter((key) => key.toLowerCase().includes(searched.toLowerCase()))
.map((key) => [key, model_hparams[key]]);
const filteredTrainerHparams = trainer_hparams_keys
.filter(key => key.toLowerCase().includes(searched.toLowerCase()))
.map(key => [key, trainer_hparams[key]]);
.filter((key) => key.toLowerCase().includes(searched.toLowerCase()))
.map((key) => [key, trainer_hparams[key]]);

const [modelHparamsVisible, setModelHparamsVisible] = useState<boolean>(true);
const [trainerHparamsVisible, setTrainerHparamsVisible] = useState<boolean>(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function Timer(props: any) {
let interval: any = null;
if (isActive) {
interval = setInterval(() => {
setTotalSeconds(totalSeconds => totalSeconds + 1);
setTotalSeconds((totalSeconds) => totalSeconds + 1);
}, 1000);
} else if (!isActive && totalSeconds !== 0) {
clearInterval(interval);
Expand Down
Loading