Skip to content

Commit 4c19506

Browse files
committed
Update outdated or broken links/URLs in code comments [skip ci]
https://pylint.readthedocs.io/en/v2.16.2/user_guide/messages/convention/consider-using-enumerate.html no longer works. The rest of the links just refers to outdated versions that we don't use/support anymore (we only support Java 8 and Python 3.8+). I considered linking to https://docs.python.org/3.8/reference/lexical_analysis.html#string-and-bytes-literals, since Python 3.8 is the oldest version we support, but the newer documentation is better organized and equivalent.
1 parent 161997f commit 4c19506

4 files changed

Lines changed: 4 additions & 5 deletions

File tree

js/src/main/scala/io/kaitai/struct/format/JavaScriptKSYParser.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ object JavaScriptKSYParser {
3131
src match {
3232
case array: js.Array[_] =>
3333
array.toList.map(yamlJavascriptToScala)
34-
// See <https://javadoc.io/doc/org.scala-js/scalajs-library_2.12/1.13.1/scala/scalajs/js/index.html>:
34+
// See <https://javadoc.io/doc/org.scala-js/scalajs-library_2.13/1.20.1/scala/scalajs/js/index.html>:
3535
//
3636
// > There are no explicit definitions for JavaScript primitive types, as
3737
// > one could expect, because the corresponding Scala types stand in

shared/src/main/scala/io/kaitai/struct/languages/PythonCompiler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ class PythonCompiler(typeProvider: ClassTypeProvider, config: RuntimeConfig)
541541
// used for all repetitions in _check()
542542
override def condRepeatCommonHeader(id: Identifier, io: String, dataType: DataType): Unit = {
543543
// TODO: replace range(len()) with enumerate() (see
544-
// https://pylint.readthedocs.io/en/v2.16.2/user_guide/messages/convention/consider-using-enumerate.html)
544+
// https://pylint.readthedocs.io/en/v4.0.5/user_guide/messages/convention/consider-using-enumerate.html)
545545
out.puts(s"for i in range(len(${privateMemberName(id)})):")
546546
out.inc
547547
out.puts("pass")

shared/src/main/scala/io/kaitai/struct/translators/JavaTranslator.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class JavaTranslator(provider: TypeProvider, importList: ImportList, config: Run
123123
override def bytesToStr(bytesExpr: String, encoding: String): String = {
124124
// Java has a small number of standard charsets preloaded. Accessing them as constants is more
125125
// efficient than looking them up by string in a map, so we utilize this when as possible.
126-
// See https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html
126+
// See https://docs.oracle.com/javase/8/docs/api/java/nio/charset/StandardCharsets.html
127127
val standardCharsetsMap = Map(
128128
"ISO-8859-1" -> "ISO_8859_1",
129129
"ASCII" -> "US_ASCII",

shared/src/main/scala/io/kaitai/struct/translators/PythonTranslator.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ class PythonTranslator(provider: TypeProvider, importList: ImportList, config: R
6767
override def doBoolLiteral(n: Boolean): String = if (n) "True" else "False"
6868

6969
/**
70-
* https://docs.python.org/2.7/reference/lexical_analysis.html#string-literals
71-
* https://docs.python.org/3.6/reference/lexical_analysis.html#string-and-bytes-literals
70+
* https://docs.python.org/3.14/reference/lexical_analysis.html#escape-sequences
7271
*/
7372
override val asciiCharQuoteMap: Map[Char, String] = Map(
7473
'\t' -> "\\t",

0 commit comments

Comments
 (0)