Skip to content

Commit c1b2df2

Browse files
committed
clean up import syntax
first comes internal modules, then system imports
1 parent a62da00 commit c1b2df2

21 files changed

Lines changed: 66 additions & 36 deletions

src/api/radiob.nim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import net, httpclient, uri, json, strutils
2-
import std/cmdline
1+
import
2+
net, httpclient, uri,
3+
json, strutils, std/cmdline
34

45
const apiEndPoint = "https://all.api.radio-browser.info/"
56
const maxStationCap = 20

src/audio/audio.nim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ const isVlc =
22
static:
33
defined(vlc)
44

5+
import os
6+
57
import vlc/helper
68
import mpv/player
7-
import os
89

910
type
1011
audioHandle* = object

src/audio/mpv/metadata.nim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# SPDX-License-Identifier: MPL-2.0
22
# metadata.nim
33

4-
import libmpv, tables, strutils, terminal, ../../utils/utils
4+
import libmpv, ../../utils/utils
5+
6+
import tables, strutils, terminal
57

68
# Mapping of common tag names (case-insensitive) to preferred names
79
const tagMap* = {

src/audio/vlc/helper.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import libvlc/libvlc, libvlc/base
1+
import libvlc/[libvlc, base]
22

33
type VlcError* = object of CatchableError
44

src/json/statuscache.nim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
import
55
json, os, asyncdispatch,
6-
../utils/utils, strutils,
7-
times, terminal, ../ui/[menuui, illwill],
6+
times, terminal, strutils,
87

9-
../ui/stationstatus
8+
../utils/utils,
9+
../ui/[menuui, illwill, stationstatus]
1010

1111
#[spec
1212
{

src/link/asynclink.nim

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
# asynclink.nim
33

44
import
5-
times, ../utils/utils, asyncdispatch,
6-
asyncnet, strutils, linkbase
5+
times, asyncdispatch, asyncnet,
6+
strutils
77

88
from net import TimeoutError
99

10+
import ../utils/utils, linkbase
11+
1012
when defined(asynclinkadv):
1113
import asynclinkadv
1214

src/link/asynclinkadv.nim

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# SPDX-License-Identifier: MPL-2.0
22
#asynclinkadv.nim
33
import
4-
times, ../utils/utils, asyncdispatch,
5-
strutils, linkbase
4+
times, asyncdispatch,
5+
strutils, net, httpclient
66

7-
import std/net, httpclient
7+
import
8+
linkbase,
9+
../utils/utils
810

911
var tempFileLogContent*: string
1012

src/link/link.nim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# SPDX-License-Identifier: MPL-2.0
22
# link.nim
33

4-
import std/net, linkbase
4+
import linkbase
5+
6+
import net
57

68
#when not defined(simple):
79
# import linkadvanced

src/link/linkadvanced.nim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# SPDX-License-Identifier: MPL-2.0
2-
import std/net, httpclient, linkbase, strutils
2+
import linkbase
3+
4+
import net, httpclient, strutils
35

46
proc validateLinkWithContentTypeCheck*(url: string; timeout = 2000): LinkValidationResult =
57
let url = normalizeUrl(url)

src/menu.nim

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22
# menu.nim
33

44
import
5-
terminal, os, strutils, net,
6-
random,
5+
terminal, os,
6+
strutils, net,
7+
random
78

9+
10+
import
811
ui/[
912
illwill,
1013
playerui,

0 commit comments

Comments
 (0)