Skip to content

Commit 0fe4a98

Browse files
committed
fix: biome errors and formatting
1 parent af430a8 commit 0fe4a98

File tree

6 files changed

+11
-24
lines changed

6 files changed

+11
-24
lines changed

exporter/SynthesisFusionAddin/src/UI/ConfigCommand.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
import src.UI.TaggingConfigTab as TaggingConfigTab
2323
from src import APP_WEBSITE_URL, Logging, gm
2424
from src.APS.APS import getAuth, getUserInfo
25+
from src.lib.DesignRuleChecks import DesignRuleChecks
2526
from src.lib.Handlers import PersistentEventHandler
2627
from src.lib.Util import convertMassUnitsTo, designMassCalculation
2728
from src.Logging import getLogger, logFailure
2829
from src.Parser.ExporterOptions import ExporterOptions
2930
from src.Parser.SynthesisParser.Utilities import guid_occurrence
3031
from src.Types import SELECTABLE_JOINT_TYPES, ExportLocation, ExportMode
3132
from src.UI import FileDialogConfig
32-
from src.lib.DesignRuleChecks import DesignRuleChecks
3333

3434
generalConfigTab: GeneralConfigTab.GeneralConfigTab
3535
jointConfigTab: JointConfigTab.JointConfigTab

exporter/SynthesisFusionAddin/src/UI/DesignCheckTab.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ def __init__(self, args: adsk.core.CommandCreatedEventArgs) -> None:
2727
adsk.core.TablePresentationStyles.itemBorderTablePresentationStyle
2828
)
2929

30-
3130
for i, rule in enumerate(DesignRuleChecks().getDesignRules()):
3231
calculation = rule["calculation"]
3332
max_value: float = rule["max_value"]

exporter/SynthesisFusionAddin/src/lib/DesignRuleChecks.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
from typing import List, TypedDict, Callable
1+
from typing import Callable, List, TypedDict
22

33
import adsk.core
44
import adsk.fusion
55

66
from src import Logging, gm
77

8+
89
class DesignRule(TypedDict):
910
name: str
1011
calculation: Callable[[], float]
1112
max_value: float
1213

14+
1315
class DesignRuleChecks:
1416
designRules: List[DesignRule]
1517

@@ -28,7 +30,6 @@ def __init__(self) -> None:
2830
},
2931
]
3032

31-
3233
def getDesignRules(self) -> List[DesignRule]:
3334
return self.designRules
3435

exporter/SynthesisFusionAddin/web/src/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useCallback, useEffect, useState } from "react"
22

33
import "./App.css"
4-
import { RestartAlt, Settings, SportsFootball, Texture, CheckBox } from "@mui/icons-material"
4+
import { CheckBox, RestartAlt, Settings, SportsFootball, Texture } from "@mui/icons-material"
55
import DownloadIcon from "@mui/icons-material/Download"
66
import PrecisionManufacturingIcon from "@mui/icons-material/PrecisionManufacturing"
77
import SaveIcon from "@mui/icons-material/Save"
@@ -32,12 +32,12 @@ import {
3232
type Joint,
3333
WheelType,
3434
} from "./lib/types.ts"
35+
import DesignCheckTab from "./ui/DesignCheckTab.tsx"
3536
import GamepiecesConfigTab from "./ui/GamepiecesConfigTab.tsx"
3637
import GeneralConfigTab from "./ui/GeneralConfigTab.tsx"
3738
import GlobalAlert from "./ui/GlobalAlert.tsx"
3839
import JointsConfigTab from "./ui/JointsConfigTab.tsx"
3940
import MaterialTaggingTab, { type TaggedBody } from "./ui/MaterialTaggingTab.tsx"
40-
import DesignCheckTab from "./ui/DesignCheckTab.tsx"
4141

4242
function TabPanel(props: { children?: React.ReactNode; value: number; index: number }) {
4343
const { children, value, index, ...other } = props

exporter/SynthesisFusionAddin/web/src/lib/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ window.fusionJavaScriptHandler = {
149149
}
150150

151151
export interface DesignRule {
152-
name: string,
153-
calculation: number,
152+
name: string
153+
calculation: number
154154
max_value: number
155155
}
156156
export async function getDesignRules(): Promise<DesignRule[] | undefined> {
@@ -167,4 +167,3 @@ export async function getDesignRules(): Promise<DesignRule[] | undefined> {
167167
}
168168
return await sendData("designRules", {})
169169
}
170-

exporter/SynthesisFusionAddin/web/src/ui/DesignCheckTab.tsx

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
1-
import {
2-
Paper,
3-
Table,
4-
TableBody,
5-
TableCell,
6-
TableContainer,
7-
TableHead,
8-
TableRow,
9-
} from "@mui/material"
1+
import { Paper, Table, TableBody, TableCell, TableContainer, TableHead, TableRow } from "@mui/material"
102
import { useEffect, useState } from "react"
113
import { type DesignRule, getDesignRules } from "../lib"
124

13-
interface DesignCheckTabProps {}
14-
15-
function DesignCheckTab({}: DesignCheckTabProps) {
5+
function DesignCheckTab() {
166
const [rules, setRules] = useState<DesignRule[]>([])
177

188
useEffect(() => {
@@ -38,9 +28,7 @@ function DesignCheckTab({}: DesignCheckTabProps) {
3828

3929
return (
4030
<>
41-
<h4>
42-
Checks Passing: {isDesignValid()}
43-
</h4>
31+
<h4>Checks Passing: {isDesignValid()}</h4>
4432
<TableContainer component={Paper} elevation={6}>
4533
<Table sx={{ minWidth: 650 }} aria-label="simple table" size={"small"}>
4634
<TableHead>

0 commit comments

Comments
 (0)