-
Notifications
You must be signed in to change notification settings - Fork 841
Demo of A2UI v0.9 lit renderer #601
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
Open
jacobsimionato
wants to merge
37
commits into
google:main
Choose a base branch
from
jacobsimionato:renderer-implement-2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
6ab973e
Add gemignore
jacobsimionato eecd6d1
Add initial design doc for v0.9 web renderers
jacobsimionato 6ba8646
iterate on rendering doc
jacobsimionato 299fde4
Update web renderers docs
jacobsimionato 5db3f0c
minor updates
jacobsimionato 5ca80d8
Switch to composition rather than inheritance
jacobsimionato 0886ebe
Add data Context
jacobsimionato 6fe1b91
Restructure design doc
jacobsimionato 6069c50
Combine docs
jacobsimionato 42d0c5a
Remove base class language and other cruft
jacobsimionato 04e47f2
readd mermaid and references
jacobsimionato 7fbf5c3
Remove some content
jacobsimionato d8cc118
Remove testing notes
jacobsimionato 18dade6
Add standard catalog factory
jacobsimionato 9277c41
Add custom catalog section
jacobsimionato 074647e
Add rename surface state to surface context
jacobsimionato c895e3d
Initial version of lit and core renderers, not working
jacobsimionato 9778509
Initial version of shell app, not tested
jacobsimionato 95cfe2a
initial version of restaurant finder agent for 0.9, not working
jacobsimionato 3610333
Improvements to the renderer to fix structure of standard catalog
jacobsimionato f082328
Add renderer v0.9 demo app
jacobsimionato e370cf1
Fix button component
jacobsimionato c17a699
Add styling support including 'additional styles' to v0.9
jacobsimionato 83e0598
Add many more examples
jacobsimionato f39d550
Remove v0.9 version of restaurant finder and shell app
jacobsimionato cab6535
Update this to use the flat v0.9 JSON format
jacobsimionato 548a06d
Remove getComponent from catalog API
jacobsimionato 79db066
Add the schema support design doc
jacobsimionato 2459adf
Add schema handling
jacobsimionato cf7f111
Update use of parameters
jacobsimionato 495a89b
revert changes to the web renderers when I added schema handling
jacobsimionato 1f6f2c7
update docs on data model API changes
jacobsimionato 12ab66e
Add some more details on zod schema stuff
jacobsimionato ea34f4f
Update data model and component context etc
jacobsimionato d12b7e7
Improve data model test slightly
jacobsimionato 13f3267
Fix handling of weight and accessibility common params
jacobsimionato 016c80f
Fix lit implementation of weight, a11y etc
jacobsimionato File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # Ignore large lock files that aren't useful for context | ||
| **/pnpm-lock.yaml | ||
| **/package-lock.json | ||
| **/uv.lock |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
|
|
||
| export * from './renderer/lit-component-context.js'; | ||
| export * from './standard_catalog/index.js'; | ||
| export * from './ui/surface.js'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
|
|
||
| import { TemplateResult } from 'lit'; | ||
| import { ComponentContext as CoreComponentContext } from '@a2ui/web_core/v0_9'; | ||
|
|
||
| // Lit currently doesn't add much on top of the generic context in v0.9 design, | ||
| // as the reactivity is handled by the `updateCallback` passed from the Surface. | ||
| // However, we might want to specialize 'renderChild' if needed, or just alias it. | ||
|
|
||
| export type LitComponentContext = CoreComponentContext<TemplateResult>; |
12 changes: 12 additions & 0 deletions
12
renderers/lit/src/v0_9/standard_catalog/components/audio-player.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import { describe, it } from 'node:test'; | ||
| import { litAudioPlayer } from './audio-player.js'; | ||
| import { createLitTestContext, assertTemplateContains } from '../../test/test-utils.js'; | ||
|
|
||
| describe('Lit AudioPlayer', () => { | ||
| it('renders audio element', () => { | ||
| const context = createLitTestContext({ url: 'audio.mp3' }); | ||
| const result = litAudioPlayer.render(context); | ||
| assertTemplateContains(result, '<audio'); | ||
| assertTemplateContains(result, 'src="audio.mp3"'); | ||
| }); | ||
| }); |
28 changes: 28 additions & 0 deletions
28
renderers/lit/src/v0_9/standard_catalog/components/audio-player.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| import { html, TemplateResult } from 'lit'; | ||
| import { classMap } from 'lit/directives/class-map.js'; | ||
| import { styleMap } from 'lit/directives/style-map.js'; | ||
| import { AudioPlayerComponent } from '@a2ui/web_core/v0_9'; | ||
| import { getAccessibilityAttributes } from '../../ui/utils.js'; | ||
|
|
||
| export const litAudioPlayer = new AudioPlayerComponent<TemplateResult>( | ||
| ({ url, description, weight }, context) => { | ||
| const classes = context.surfaceContext.theme.components.AudioPlayer; | ||
| const a11y = getAccessibilityAttributes(context); | ||
| const styles: Record<string, string> = {}; | ||
| if (weight !== undefined) { | ||
| styles['flex-grow'] = String(weight); | ||
| } | ||
|
|
||
| return html` | ||
| <audio | ||
| src="${url}" | ||
| controls | ||
| class=${classMap(classes)} | ||
| style=${styleMap(styles)} | ||
| title=${description || a11y['aria-label'] || null} | ||
| aria-label=${a11y['aria-label'] || null} | ||
| aria-description=${a11y['aria-description'] || description || null} | ||
| ></audio> | ||
| `; | ||
| } | ||
| ); |
18 changes: 18 additions & 0 deletions
18
renderers/lit/src/v0_9/standard_catalog/components/button.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import { describe, it } from 'node:test'; | ||
| import { litButton } from './button.js'; | ||
| import { createLitTestContext, assertTemplateContains } from '../../test/test-utils.js'; | ||
|
|
||
| describe('Lit Button', () => { | ||
| it('renders button element', () => { | ||
| const context = createLitTestContext({ label: 'Click Me' }); | ||
| const result = litButton.render(context); | ||
| assertTemplateContains(result, '<button'); | ||
| assertTemplateContains(result, 'Click Me'); | ||
| }); | ||
|
|
||
| it('renders child content overrides label', () => { | ||
| const context = createLitTestContext({ label: 'Label', child: 'Custom Content' }); | ||
| const result = litButton.render(context); | ||
| assertTemplateContains(result, 'Custom Content'); | ||
| }); | ||
| }); |
24 changes: 24 additions & 0 deletions
24
renderers/lit/src/v0_9/standard_catalog/components/button.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import { resolve } from 'path'; | ||
| import { html, TemplateResult } from 'lit'; | ||
| import { classMap } from 'lit/directives/class-map.js'; | ||
| import { styleMap } from 'lit/directives/style-map.js'; | ||
| import { ButtonComponent } from '@a2ui/web_core/v0_9'; | ||
| import { getStyleMap, getAccessibilityAttributes } from '../../ui/utils.js'; | ||
|
|
||
| export const litButton = new ButtonComponent<TemplateResult>( | ||
| ({ label, disabled, onAction, child, weight }, context) => { | ||
| const classes = context.surfaceContext.theme.components.Button; | ||
| const styles = getStyleMap(context, 'Button'); | ||
| const a11y = getAccessibilityAttributes(context); | ||
|
|
||
| if (weight !== undefined) { | ||
| styles['flex-grow'] = String(weight); | ||
| } | ||
|
|
||
| return html` | ||
| <button class=${classMap(classes)} style=${styleMap(styles)} ?disabled=${disabled} @click=${onAction} aria-label=${a11y['aria-label'] || label} aria-description=${a11y['aria-description'] || null}> | ||
| ${child ? child : label} | ||
| </button> | ||
| `; | ||
| } | ||
| ); | ||
11 changes: 11 additions & 0 deletions
11
renderers/lit/src/v0_9/standard_catalog/components/card.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import { describe, it } from 'node:test'; | ||
| import { litCard } from './card.js'; | ||
| import { createLitTestContext, assertTemplateContains } from '../../test/test-utils.js'; | ||
|
|
||
| describe('Lit Card', () => { | ||
| it('renders card container', () => { | ||
| const context = createLitTestContext({ child: null }); | ||
| const result = litCard.render(context); | ||
| assertTemplateContains(result, 'class="a2ui-card"'); | ||
| }); | ||
| }); |
23 changes: 23 additions & 0 deletions
23
renderers/lit/src/v0_9/standard_catalog/components/card.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import { html, TemplateResult } from 'lit'; | ||
| import { classMap } from 'lit/directives/class-map.js'; | ||
| import { styleMap } from 'lit/directives/style-map.js'; | ||
| import { CardComponent } from '@a2ui/web_core/v0_9'; | ||
| import { getStyleMap, getAccessibilityAttributes } from '../../ui/utils.js'; | ||
|
|
||
| export const litCard = new CardComponent<TemplateResult>( | ||
| ({ child, weight }, context) => { | ||
| const classes = context.surfaceContext.theme.components.Card; | ||
| const styles = getStyleMap(context, 'Card'); | ||
| const a11y = getAccessibilityAttributes(context); | ||
|
|
||
| if (weight !== undefined) { | ||
| styles['flex-grow'] = String(weight); | ||
| } | ||
|
|
||
| return html` | ||
| <div class=${classMap(classes)} style=${styleMap(styles)} aria-label=${a11y['aria-label'] || null} aria-description=${a11y['aria-description'] || null}> | ||
| ${child} | ||
| </div> | ||
| `; | ||
| } | ||
| ); |
16 changes: 16 additions & 0 deletions
16
renderers/lit/src/v0_9/standard_catalog/components/check-box.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import { describe, it } from 'node:test'; | ||
| import { litCheckBox } from './check-box.js'; | ||
| import { createLitTestContext, assertTemplateContains } from '../../test/test-utils.js'; | ||
|
|
||
| describe('Lit CheckBox', () => { | ||
| it('renders label and checked state', () => { | ||
| const context = createLitTestContext({ label: 'Accept Terms', value: true }); | ||
| const result = litCheckBox.render(context); | ||
| assertTemplateContains(result, 'Accept Terms'); | ||
| // Lit boolean attributes often show as ?checked or checked depending on binding. | ||
| // In string template: .checked="${value}" -> bound via property | ||
| // We can't easily verify the PROPERTY value in static analysis of TemplateResult strings mostly. | ||
| // But we can verify the structure exists. | ||
| assertTemplateContains(result, 'type="checkbox"'); | ||
| }); | ||
| }); |
31 changes: 31 additions & 0 deletions
31
renderers/lit/src/v0_9/standard_catalog/components/check-box.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| import { html, TemplateResult } from 'lit'; | ||
| import { classMap } from 'lit/directives/class-map.js'; | ||
| import { styleMap } from 'lit/directives/style-map.js'; | ||
| import { CheckBoxComponent } from '@a2ui/web_core/v0_9'; | ||
| import { getAccessibilityAttributes } from '../../ui/utils.js'; | ||
|
|
||
| export const litCheckBox = new CheckBoxComponent<TemplateResult>( | ||
| ({ label, value, onChange, weight }, context) => { | ||
| const classes = context.surfaceContext.theme.components.CheckBox; | ||
| const a11y = getAccessibilityAttributes(context); | ||
| const styles: Record<string, string> = {}; | ||
| if (weight !== undefined) { | ||
| styles['flex-grow'] = String(weight); | ||
| } | ||
|
|
||
| return html` | ||
| <div class=${classMap(classes)} style=${styleMap(styles)}> | ||
| <label> | ||
| <input | ||
| type="checkbox" | ||
| .checked="${value}" | ||
| @change="${(e: Event) => onChange((e.target as HTMLInputElement).checked)}" | ||
| aria-label=${a11y['aria-label'] || label} | ||
| aria-description=${a11y['aria-description'] || null} | ||
| /> | ||
| ${label} | ||
| </label> | ||
| </div> | ||
| `; | ||
| } | ||
| ); |
17 changes: 17 additions & 0 deletions
17
renderers/lit/src/v0_9/standard_catalog/components/choice-picker.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import { describe, it } from 'node:test'; | ||
| import { litChoicePicker } from './choice-picker.js'; | ||
| import { createLitTestContext, assertTemplateContains } from '../../test/test-utils.js'; | ||
|
|
||
| describe('Lit ChoicePicker', () => { | ||
| it('renders options', () => { | ||
| const context = createLitTestContext({ | ||
| label: 'Choose', | ||
| value: ['a'], | ||
| options: [{ label: 'Option A', value: 'a' }, { label: 'Option B', value: 'b' }] | ||
| }); | ||
| const result = litChoicePicker.render(context); | ||
| assertTemplateContains(result, 'Choose'); | ||
| assertTemplateContains(result, 'Option A'); | ||
| assertTemplateContains(result, 'Option B'); | ||
| }); | ||
| }); |
49 changes: 49 additions & 0 deletions
49
renderers/lit/src/v0_9/standard_catalog/components/choice-picker.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| import { html, TemplateResult } from 'lit'; | ||
| import { classMap } from 'lit/directives/class-map.js'; | ||
| import { styleMap } from 'lit/directives/style-map.js'; | ||
| import { ChoicePickerComponent } from '@a2ui/web_core/v0_9'; | ||
| import { getAccessibilityAttributes } from '../../ui/utils.js'; | ||
|
|
||
| export const litChoicePicker = new ChoicePickerComponent<TemplateResult>( | ||
| ({ label, options, value, variant, onChange, weight }, context) => { | ||
| const classes = context.surfaceContext.theme.components.ChoicePicker; | ||
| const a11y = getAccessibilityAttributes(context); | ||
| const styles: Record<string, string> = {}; | ||
| if (weight !== undefined) { | ||
| styles['flex-grow'] = String(weight); | ||
| } | ||
|
|
||
| // Simple select implementation for now | ||
| const isMultiple = variant === 'multipleSelection'; | ||
| const handleChange = (e: Event) => { | ||
| const select = e.target as HTMLSelectElement; | ||
| if (isMultiple) { | ||
| const values = Array.from(select.selectedOptions).map(opt => opt.value); | ||
| onChange(values); | ||
| } else { | ||
| onChange([select.value]); | ||
| } | ||
| }; | ||
|
|
||
| return html` | ||
| <div class=${classMap(classes)} style=${styleMap(styles)}> | ||
| <label>${label}</label> | ||
| <select | ||
| ?multiple="${isMultiple}" | ||
| @change="${handleChange}" | ||
| aria-label=${a11y['aria-label'] || label} | ||
| aria-description=${a11y['aria-description'] || null} | ||
| > | ||
| ${options.map(opt => html` | ||
| <option | ||
| value="${opt.value}" | ||
| ?selected="${value.includes(opt.value)}" | ||
| > | ||
| ${opt.label} | ||
| </option> | ||
| `)} | ||
| </select> | ||
| </div> | ||
| `; | ||
| } | ||
| ); |
13 changes: 13 additions & 0 deletions
13
renderers/lit/src/v0_9/standard_catalog/components/column.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
|
|
||
| import { describe, it } from 'node:test'; | ||
| import { litColumn } from './column.js'; | ||
| import { createLitTestContext, assertTemplateContains } from '../../test/test-utils.js'; | ||
|
|
||
| describe('Lit Column', () => { | ||
| it('renders column', () => { | ||
| const context = createLitTestContext({ children: [], direction: 'column' }); | ||
| const result = litColumn.render(context); | ||
| assertTemplateContains(result, 'display: flex'); | ||
| assertTemplateContains(result, 'flex-direction: column'); | ||
| }); | ||
| }); |
40 changes: 40 additions & 0 deletions
40
renderers/lit/src/v0_9/standard_catalog/components/column.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
|
|
||
| import { html, TemplateResult } from 'lit'; | ||
| import { classMap } from 'lit/directives/class-map.js'; | ||
| import { styleMap } from 'lit/directives/style-map.js'; | ||
| import { ColumnComponent } from '@a2ui/web_core/v0_9'; | ||
| import { getAccessibilityAttributes } from '../../ui/utils.js'; | ||
|
|
||
| export const litColumn = new ColumnComponent<TemplateResult>( | ||
| ({ children, justify, align, weight }, context) => { | ||
| const classes = context.surfaceContext.theme.components.Column; | ||
| const a11y = getAccessibilityAttributes(context); | ||
|
|
||
| // Map justify/align | ||
| const alignClasses: Record<string, boolean> = {}; | ||
| if (justify) { | ||
| // For Column, justify is vertical (main axis) | ||
| const map: Record<string, string> = { 'start': 'layout-sp-s', 'center': 'layout-sp-c', 'end': 'layout-sp-e', 'between': 'layout-sp-bt', 'evenly': 'layout-sp-ev' }; | ||
| if (map[justify]) alignClasses[map[justify]] = true; | ||
| } | ||
| if (align) { | ||
| // For Column, align is horizontal (cross axis) | ||
| const map: Record<string, string> = { 'start': 'layout-al-fs', 'center': 'layout-al-c', 'end': 'layout-al-fe', 'stretch': 'layout-al-st' }; | ||
| if (map[align]) alignClasses[map[align]] = true; | ||
| } | ||
|
|
||
| const styles: Record<string, string> = { | ||
| display: 'flex', | ||
| 'flex-direction': 'column', | ||
| }; | ||
| if (weight !== undefined) { | ||
| styles['flex-grow'] = String(weight); | ||
| } | ||
|
|
||
| return html` | ||
| <div class=${classMap({ ...classes, ...alignClasses })} style=${styleMap(styles)} aria-label=${a11y['aria-label'] || null} aria-description=${a11y['aria-description'] || null}> | ||
| ${children} | ||
| </div> | ||
| `; | ||
| } | ||
| ); |
18 changes: 18 additions & 0 deletions
18
renderers/lit/src/v0_9/standard_catalog/components/date-time-input.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import { describe, it } from 'node:test'; | ||
| import { litDateTimeInput } from './date-time-input.js'; | ||
| import { createLitTestContext, assertTemplateContains } from '../../test/test-utils.js'; | ||
|
|
||
| describe('Lit DateTimeInput', () => { | ||
| it('renders date input', () => { | ||
| const context = createLitTestContext({ label: 'Birthday', value: '2000-01-01', enableDate: true }); | ||
| const result = litDateTimeInput.render(context); | ||
| assertTemplateContains(result, 'Birthday'); | ||
| assertTemplateContains(result, 'type="date"'); | ||
| }); | ||
|
|
||
| it('renders time input', () => { | ||
| const context = createLitTestContext({ label: 'Alarm', value: '12:00', enableTime: true, enableDate: false }); | ||
| const result = litDateTimeInput.render(context); | ||
| assertTemplateContains(result, 'type="time"'); | ||
| }); | ||
| }); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import
resolvefrom thepathmodule is not used in this file and should be removed to keep the code clean.